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$
2
$\begingroup$

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

See an example here

| improve this answer | |
$\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..

| improve this answer | |
$\endgroup$
  • $\begingroup$ You mean in order to not use strongly correlated columns? $\endgroup$ – Sören Mar 1 '18 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 '18 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.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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