Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python model feature importance

model = XGBClassifier()
m = model.fit(X , y)
zip_iterator = zip(list(X.columns), m.feature_importances_)
feature_dict = dict(zip_iterator)
dict( sorted(feature_dict.items(), key=operator.itemgetter(1),reverse=True))
 
PREVIOUS NEXT
Tagged: #python #model #feature #importance
ADD COMMENT
Topic
Name
5+5 =