mmc.Hierarchy.set_clf()

Hierarchy.set_clf(name, clf, feature_names)

Stores a trained classifier and a list of features used for training of a specified classification level.

Parameters:
  • name (str) – The name of the classification node to add this information to

  • clf (RandomForestClassifier) – A sklearn machine learning classifier to store in the hierarchy and use for prediction

  • feature_names (List[str]) – A list of all features used for classification