User's Guide

BDIST

Calculate BHATTACHARYYA distances between pairs of classes.

Function:

Calculates the Bhattacharyya distances between pairs of classes in a statistics file. If a specified number of classes or bands (features) are to be analyzed, the program will interactively prompt for class names and combinations of bands to be used.

Parameters:

INSTAT
Input statistics file. Contains the means and covariances for each class to be analyzed.

NCLASS(--)
Number of classes. The number of classes to be analyzed that will be specified interactively. The default is to use all classes.

BANDOPT(--)
Band option. Number of band sets to be processed. (See User Note 1).


  = --:  All bands
  =  N:  All combination of N bands
  = -N:  N band sets specified interactively

The user may select the band sub-sets (features) to be analyzed. By default all bands will be used together in a single set.

If BANDOPT = N, then all possible combinations of N bands will be used. For example, with a 4 band file and BANDOPT = 3 distances will be calculated for:


(a) BANDS 1,2,3 
(b) BANDS 1,2,4 
(c) BANDS 1,3,4 
(d) BANDS 2,3,4

If BANDOPT = -N, the user will be prompted interactively for N feature sets. This allows the user to vary the number of bands in each set.

PRINT(TERM)
Output destination.


  = TERM:     Terminal
  = LP:       Line printer
  = filename: User supplied
              filename

Example:

  1. LAS> bdist instat=balt.stats nclass=4 bandopt=2

    BDIST computes the Bhattacharyya distance between any two of the four classes specified interactively. All possible combinations of two bands are used.

Description/Algorithm:

Bhattacharyya distance is a measure of separability between classes and may therefore be used to assess the quality of the statistics prior to classification.

Distances are calculated for specified features sets that consist of subsets of the bands in the file. For each feature set, the pairwise distance is given by:


                 T        -1      
 D  = 0.25(M -M ) (C + C )  (M -M )
  ij        i  j    i   j     i  j         
  
                     | C  + C  |
                        i    j
      +0.5 ln   (-----------------)
                         1/2   1/2
                 2 | C  |   | C   |
                      i        j


where
      Dij = Bhattacharyya distance between 
            classes i and j
      Ci  = covariance matrix for class i
      Cj  = covariance matrix for class j
      Mi  = mean vector for class i
      Mj  = mean vector for class j

The average distance for all class pairs is also calculated.

The user may specify the number of classes to be analyzed. Unless all the classes are specified, the user will be interactively prompted for class names.

Nonfatal Error Message:

  1. [bdist-determ] Warning: Determinant of covariance matrix is less than or equal to zero for class # nn.

    The determinant of the covariance matrix for class nn is less than or equal to zero. The distances of all class pairs involving that class are set to -1.0.

Fatal Error Messages:

  1. [bdist-batch] BDIST must be run interactively with NCLASS > 0 or BANDOPT < 0

    BDIST cannot be run in batch mode when NCLASS or BANDOPT is set to specify values interactively.

  2. [bdist-nclass] Number of classes in file less than number requested

    Check the statistics file or specify for all available classes in the statistics file.

  3. [bdist-class] 3 errors in specifying a class name; restart

    The user has only three attempts to enter a valid class name.

  4. [bdist-meansiz] Mean has too few bands for class # nn

    Check the statistics file.

  5. [bdist-covsiz] Covariance has too few bands in class # nn

    Check the statistics file.

  6. [bdist-cov] Error getting covariance matrix for class nn

    Regenerate the statistics file containing the statistics for class # nn.

  7. [bdist-mean] Error getting mean vector for class nn

    Regenerate the statistics file containing the statistics for class # nn.

User's Notes:

  1. The user may select the band subsets (features) to be used. This may be done in two ways: o By selecting to process all possible combinations of N bands. For example, if there are four bands in the file and the user selects to process all combinations for three bands, then distances will be calculated in turn for:

    (a) bands 1, 2, 3 (b) bands 1, 2, 4 (c) bands 1, 3, 4 (d) bands 2, 3, 4

    o By selecting to specify feature sets interactively for up to a total of N feature sets. For example, if the user selects to process three feature sets, the selections are:

    (a) number of bands=4: bands 1, 2, 3, 4 (b) number of bands=2: bands 1, 4 (c) number of bands=3: bands 1, 3, 4

    By default, a single feature set will be analyzed consisting of all bands.