Documentation for GenerateResultBox

This module is inherited from ResultSet class and allows for results generation.

get_optimal_threshold(self)

Get optimal threshold to convert predictions in a binary class based on the training set predictions.

Returns:
  • float – An optimal threshold value.

get_results(self, label=None)

Generate a dataframe containing standard results based on the labels and predictions.

Parameters:
  • label (str) – Takes a str Label as input.

Returns:
  • DataFrame – The dataframe of the results.

get_stats_with_ci(self, label=None, nsamples=2000)

Classification report with confidence intervals.

Parameters:
  • label (str) – Takes a Label as an input.

  • nsamples (int) – Number of iterations for bootstrapping.

Returns:
  • DataFrame – The dataframe of the results with confidence interval.

plot_roc_auc_ci(self, title='', nsamples=2000, save_fig=False)

Plot the roc curve(s) of the different datasets available.

Parameters:
  • title (str) – Title of the roc curve.

  • nsamples (int) – Number of iteration for bootstrapping.

  • save_fig (bool) – Enable/disable saving a figure.

Returns:
  • str – Figure.

print_confusion_matrix(self, label=None, class_names=None, figsize=(6, 5), fontsize=14, normalize=True, save_fig=False)

Print confusion matrix.

Parameters:
  • label (str) – Takes a label as an input.

  • class_names (list) – Names of the classes.

  • figsize – Parameter to set a size of a figure.

  • fontsize (int) – Parameter to set size of font.

  • normalize (bool) – Enable/disable confusion matrix normalization.

  • save_fig (bool) – Enable/disable saving the figure.

Returns:
  • Figure – Confusion matrix.