Last active
June 1, 2018 09:47
-
-
Save FelixChop/63c2ed63576f29c5eef1fe4b790a7103 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.ensemble import RandomForestClassifier # from xgboost import XGBClassifier | |
model = RandomForestClassifier() # XGBClassifier() | |
model.fit(X, y) | |
pd.DataFrame({'Variable':X.columns, | |
'Importance':model.feature_importances_}).sort_values('Importance', ascending=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment