henchman.plotting.roc_auc(X, y, model, pos_label=1, prob_col=1, n_splits=1, figargs=None)[source]

Plots the reveiver operating characteristic curve. This function creates a fit model and shows the results of the roc curve.

  • X (pd.DataFrame) – The dataframe on which to create a model.
  • y (pd.Series) – The labels for which to create a model.
  • pos_label (int) – Which label to check for fpr and tpr. Default is 1.
  • prob_col (int) – The columns of the probs dataframe to use.
  • n_splits (int) – The number of splits to use in validation.


If the dataframe X has a binary classification label y:

>>> import henchman.plotting as hplot
>>> from sklearn.ensemble import RandomForestClassifier
>>> plot = hplot.roc_auc(X, y, RandomForestClassifier())
>>> hplot.show(plot)