Clear Filters
Clear Filters

How to get LDA classifier weights with classify?

1 view (last 30 days)
Laurie
Laurie on 12 May 2017
Edited: Laurie on 12 May 2017
I'm using classify for LDA and want to extract the classifier weights. I am using R2013b, which means that I have to use classify for this problem. Positive classes are labeled as 1, and negative classes as -1 in a binary classification problem. I'm running classify as follows: classify(test_data , train_data ,labels_train,'linear')
What I'm getting from coeff(2).linear seems to be the weights... but if I try to get the weights by another method (sum of the feature vectors of the positive minus negative classes) I'm not getting exactly the same values. The values do correlate strongly, but they're not the same.
How do I get the LDA weights from classify?

Answers (0)

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!