How Maximum Likelihood Classification works

Available with Spatial Analyst license.

The algorithm used by the Maximum Likelihood Classification tool is based on two principles:

  • The cells in each class sample in the multidimensional space being normally distributed
  • Bayes' theorem of decision making

The tool considers both the means and covariances of the class signatures when assigning each cell to one of the classes represented in the signature file. With the assumption that the distribution of a class sample is normal, a class can be characterized by the mean vector and the covariance matrix. Given these two characteristics for each cell value, the statistical likelihood is computed for each class to determine the membership of the cells to the class. When the default Equal option for A priori probability weighting is specified, each cell is assigned to the class to which it has the highest likelihood of being a member.

If the likelihood of occurrence of some classes is higher (or lower) than the average, the File a priori option should be used with an Input a priori probability file. The weights for the classes with special probabilities are specified in the a priori file. In this situation, an a priori file assists in the allocation of cells that lie in the statistical overlap between two classes. These cells are more accurately assigned to the appropriate class, resulting in a better classification. This weighting approach to classification is referred to as the Bayesian classifier.

By choosing the Sample a priori option, the a priori probabilities assigned to all classes sampled in the input signature file are proportional to the number of cells captured in each signature. Consequently, classes that have fewer cells than the average in the sample receive weights below the average, and those with more cells receive weights greater than the average. As a result, the respective classes have more or fewer cells assigned to them.

When a maximum likelihood classification is performed, an optional output confidence raster can also be produced. This raster shows the levels of classification confidence. The number of levels of confidence is 14, which is directly related to the number of valid reject fraction values. The first level of confidence, coded in the confidence raster as 1, consists of cells with the shortest distance to any mean vector stored in the input signature file; therefore, the classification of these cells has highest certainty. The cells comprising the second level of confidence (cell value 2 on the confidence raster) would be classified only if the reject fraction is 0.99 or less. The lowest level of confidence has a value of 14 on the confidence raster, showing the cells that would most likely be misclassified. Cells of this level will not be classified when the reject fraction is 0.005 or greater. If there are no cells classified at a particular confidence level, that confidence level will not be present in the output confidence raster.

Example

The following example shows how the Maximum Likelihood Classification tool is used to perform a supervised classification of a multiband raster into five land use classes.

The input multiband raster for the classification is a raw four band Landsat TM satellite image of the northern area of Cincinnati, Ohio.

Input Landsat TM image
Example Landsat TM image, with bands 4, 3, and 2 displayed as a false color image.

From the image, five land-use classes were defined in a feature class to produce the training samples: Commercial/Industrial, Residential, Cropland, Forest, and Pasture. The Create Signatures tool was used to calculate the statistics for the classes to produce a signature file.

Using the input multiband raster and the signature file, the Maximum Likelihood Classification tool is used to classify the raster cells into the five classes.

  • Settings used in the Maximum Likelihood Classification tool dialog box:

    Input raster bandsnortherncincy.tif

    Input signature filesignature.gsg

    Output multiband rasterlanduse

    Reject fraction0.0

    A priori probability weightingEQUAL

    Input a priori probability file<blank>

    Output confidence rasterconfidence_ras

The classified raster appears as shown:

Output classified land use map
Output classified land use map.

An output confidence raster was also created. Below is the resulting attribute table for the confidence raster. It shows the number of cells classified with what amount of confidence. Value 1 has a likelihood of at least 0.995 of being correct. There are 69 cells that were classified with that level of confidence. Value 5 has a likelihood of at least 0.9 but less than 0.995 of being correct. There were 744,128 cells that have a likelihood of less than 0.005 of being correct with a value of 14.

RECORD    VALUE    COUNT
0             1       69
1             2      462
2             3     1834
3             4     1123
4             5     2044
5             6     9140
6             7    28443
7             8    46781
8             9    63234
9            10    46393
10           11    42157
11           12    54506
12           13    37937
13           14   744128

Related topics


In this topic
  1. Example