2
$\begingroup$

I have several random forest models that work well. Now, I would like to do feature selection based on this models. How do I find out which features were used frequently by a model e.g. RandomForestClassifier in scikit-learn?

$\endgroup$

3 Answers 3

2
$\begingroup$

Feature importance it is a property of the random forrest classifier.

See an example here

$\endgroup$
0
$\begingroup$

Just to add to the feature Importance of the RF's , don't forget to use the hierarchical clustering from scipy and plot the dendograms..

It will help you find the similar columns..

$\endgroup$
2
  • $\begingroup$ You mean in order to not use strongly correlated columns? $\endgroup$
    – Soren
    Mar 1, 2018 at 12:59
  • $\begingroup$ Plotting the dendogram will reveal the similar columns so you can take a sneak peak at them and them do experiments like dropping one of them let say and then re run the model and recur $\endgroup$
    – Aditya
    Mar 1, 2018 at 13:11
0
$\begingroup$

Try looking at the DALEX package for R. It is designed to specifically investigate the importance of input variables to perhaps otherwise opaque ML algos.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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