2
$\begingroup$

I have a data set with four variables and 3000+ observations on which I performed an LDA. I was wondering how I can use the scaled coefficients of linear discriminants (output of R shown below as example) to draw decision boundaries in the original variable space?

          LD1      LD2     LD3
[1,]  49.5077  12.3211 20.8351
[2,]  11.3597   9.5139  8.6570
[3,]  39.9696   2.3232  2.8996
[4,] -18.4602 -43.5083  1.1121
$\endgroup$
1
$\begingroup$

You can get the mathematical function describing the discriminant by plugging the mean vectors per class and the sample covariance marix into Fishers discriminant function equation (http://en.m.wikipedia.org/wiki/Linear_discriminant_analysis). The function itself is the decision boundary. Data points are classified based on their location in feature space relative to this function.

However, it would be pretty difficult to draw (graph) a four dimensional surface (4 features). The best you can do is fix 1 or more feature values and then plot the variation of the others for those fixed values.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ But the function returns a scalar value corresponding to the separation distance rather than a multi-dimensional boundary? Unless I am mistaken. Right, I plan to draw projections where two other dimensions are fixed (or resort to contour lines). $\endgroup$ – hatmatrix Oct 1 '12 at 5:49
  • $\begingroup$ For the two class case you can use a single discriminant function, d to handle classification. Classes are labelled based on d>0 or d<0, therefore you can use d as the decision boundary. I am not familiar with the R implementation so can't comment on it. There isa good discussion of linear discriminants in Kuncheva's book "Combining classifiers" $\endgroup$ – BGreene Oct 1 '12 at 7:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.