I'm conducting an experiment in R
. I am using the rattle
library that contains a sample of the wine related data.
Within this data, it sorts the wine into 3 types (1,2,3). That is, K = 3.
So did the following test within R
:
test <- lda(Type ~ Malic+Ash , data=wine)
The result was as follows:
Call:
lda(Type ~ Malic + Ash, data = wine)
Prior probabilities of groups:
1 2 3
0.3314607 0.3988764 0.2696629
Group means:
Malic Ash
1 2.010678 2.455593
2 1.932676 2.244789
3 3.333750 2.437083
Coefficients of linear discriminants:
LD1 LD2
Malic -0.9992257 0.3702831
Ash -1.0283229 -3.7678317
Proportion of trace:
LD1 LD2
0.7992 0.2008
My question is, what do LD1 and LD2 mean in practice?
Because by my understanding since K = 3, we should also have an LD3, because we would have three linear discriminant functions, and through these three functions we would classify new data.