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).
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
How can I get the Fishers classification function coefficients and their constants?
I would eventually like to classify other observations using the equations…
Thanks.
Jeff,
Please look at the other Real Statistics webpages on this topic, namely
https://real-statistics.com/multivariate-statistics/discriminant-analysis/linear-discriminant-analysis/
https://real-statistics.com/multivariate-statistics/discriminant-analysis/discriminant-analysis-tools/
Charles
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!
Hi Mat,
Press Ctrl-m and click on the Reg tab. Now select the Binary Logistic and Probit Regression option.
Charles