henchman.plotting.feature_importances

henchman.plotting.feature_importances(X, model, n_feats=5, figargs=None)[source]

Plot feature importances.

Parameters:
  • X (pd.DataFrame) – A dataframe with which you have trained.
  • model – Any fit model with a feature_importances_ attribute.
  • n_feats (int) – The number of features to plot.

Example

>>> import henchman.plotting as hplot
>>> plot = hplot.feature_importances(X, model, n_feats=10)
>>> hplot.show(plot)