Classification using Discriminant Analysis

We can use the approach described in Linear Discriminant Analysis to classify all the X vectors in the training set for Example 1 of Linear Discriminant Analysis. This is shown on the left side of Figure 1 (only 16 of the 32 vectors are shown). As you can see, the first 6 vectors are classified correctly, while the 7th (row 10) is not, since the true value is loam (cell R10), while the discriminant analysis predicts this vector to be in the sandy category (cell Z10).

Classification Table LDA

Figure 1 – Classification Table

We can then create a classification table (aka a confusion table) as shown in range AB3:AG8. E.g. cell AC4 contains the formula

=COUNTIFS($R$4:$R$35,$AB4,$Z$4:$Z$35,AC$3)

Highlighting range AC4:AF7 and pressing Ctrl-R and Ctrl-D fills in the other cells, with the marginal totals being added in an obvious way.

Using the classification table, we can also calculate a table of misclassifications as shown in range AB12:AF17. E.g. range AC13:AC16 contains the array formula =DIAG(AC4:AF7). We see that 75% of the vectors in the loam population are correctly classified by the model, while overall 56.3% of the vectors are correctly classified.

Reference

Penn State (2017) Estimating misclassification probabilities. STAT 505 Applied Multivariate Statistical Analysis
https://online.stat.psu.edu/stat505/lesson/10/10.5

4 thoughts on “Classification using Discriminant Analysis”

  1. How can I get the Fishers classification function coefficients and their constants?
    I would eventually like to classify other observations using the equations…
    Thanks.

    Reply
  2. Hi, I am looking to do logistics regression, I am new at these tools, I installed your add-in but can’t find the logistics regression in it. Help needed!

    Reply

Leave a Comment