mmc.feature_importances()

mmochi.plotting.feature_importances(hierarchy, level)

Returns a DataFrame of features used in classification and their importances in the random forest of a given level. See sklearn.RandomForestClassifier for more information on interpreting these values.

Parameters:
  • hierarchy – Hierarchy object containing classification levels

  • level (str) – Name of the level of interest to pull the tree, must have a trained classifier attached to it

Returns:

Dataframe of features ordered by their importance

Return type:

df