Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

sklearn random forest feature importance

from sklearn.ensemble import RandomForestClassifier

feature_names = [f'feature {i}' for i in range(X.shape[1])]
forest = RandomForestClassifier(random_state=0)
forest.fit(X_train, y_train)
Source by scikit-learn.org #
 
PREVIOUS NEXT
Tagged: #sklearn #random #forest #feature #importance
ADD COMMENT
Topic
Name
6+9 =