How to use feature selection in an external .mat file

1 view (last 30 days)
Hi,
I am trying to use feature selection to determine the importance of the variables A1....A9 in relation to the variable A10. Each of these variables is on the Columns of the S2_T1.mat matrix. I have written a code, but the scores returned are [Inf,Inf,Inf,Inf,Inf,Inf,Inf,Inf,Inf]. Can someone help me spot the possible cause(s) of the flaws in the code?
load S2_T1.mat
varnames={'A1';'A2';'A3';'A4';'A5';'A6';'A7';'A8';'A9';'A10'};
S2_T1.Properties.VariableNames = varnames;
[idx,scores] = fsrftest(S2_T1,'A10');
find(isinf(scores))
bar(scores(idx))
xlabel('Predictor rank')
ylabel('Relative Importance Score')
I thank you in advance
Best regards,

Answers (0)

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!