How to use feature selection in an external .mat file

1 visualización (últimos 30 días)
Hugo
Hugo el 25 de En. de 2022
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,

Respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by