Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Print 10 most important features ascending

important_features_dict = {}
for idx, val in enumerate(model.feature_importances_):
    important_features_dict[idx] = val

important_features_list = sorted(important_features_dict,
                                 key=important_features_dict.get,
                                 reverse=True)

print(f"10 most important features: {important_features_list[:10]}")
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Print #important #features #ascending
ADD COMMENT
Topic
Name
1+6 =