how can we know the most imortant predictor in Discriminant analysis

hey every one i used the classify function in matlab to implement Discriminant analysis to classify three groups how can we know the most important predictors or the important of each predictors (variables) we used in Discriminant analysis.
thanks for advance

Antworten (1)

Ilya
Ilya am 26 Feb. 2014

1 Stimme

After the training data are standardized to zero mean and unit variance, you can use the coefficient magnitude as a measure of the predictor importance. If you switch to the new ClassificationDiscriminant class, this measure is stored in the DeltaPredictor property.
Otherwise use the sequentialfs function to rank predictors. Unless the number of predictors is very large, I would recommend backward elimination over forward addition.

3 Kommentare

hi again what is the magnitude on coeff means and how can we use it to compute the importance of predictors i have two groups and 11 predictors with 476 value when i use this function [class,err,coeff] = classify(sample,training,group); where sample is 476*11 and training 9520*11 and in the result coeff was 476*2
Take a look at the doc or help for classify. coeff is 5th output, not 3rd.
abs(coeff(1,2).linear)
gives you the magnitude of coefficients for separation of classes 1 and 2. The larger the magnitude, the more important the predictor.
This advice does not apply to quadratic discriminant.
Dear IIya,
I came across this old post as I would like to find linear coefficient of my linear discriminant classifier.
This is what I simply did
load fisheriris
LDAClassifier = ClassificationDiscriminant.fit( meas(51:end,:), species(51:end), 'DiscrimType', 'linear');
LDAClassifier.DeltaPredictor
ans =
1.0298 0.8875 1.7863 1.4821
That is fine, however, if I use a ClassificationPartitionedModel
LDAClassifier = ClassificationDiscriminant.fit( meas(51:end,:), species(51:end), 'DiscrimType', 'linear', 'Leaveout', 'on');
DeltaPredictor are no longer available. How can I linear coefficients in this case?
Thank you very much for your help,
Andrea

Melden Sie sich an, um zu kommentieren.

Gefragt:

am 26 Feb. 2014

Kommentiert:

am 18 Jul. 2019

Community Treasure Hunt

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

Start Hunting!

Translated by