scikitplot.utils#

This package/module is designed to be compatible with both Python 2 and Python 3. The imports below ensure consistent behavior across different Python versions by enforcing Python 3-like behavior in Python 2.

Utility functions and helpers for the scikitplot library.

Developer guide. See the Utilities for Developers section for further details.

Optimal mathematical operations#

This package/module is designed to be compatible with both Python 2 and Python 3. The imports below ensure consistent behavior across different Python versions by enforcing Python 3-like behavior in Python 2.

Helper functions and generic utilities for use in scikitplot code.

helpers.combine_and_save_figures

Combine multiple figures into a single image, save it (if specified), and return the combined figure.

helpers.validate_labels

Validates the labels passed into arguments such as true_labels or pred_labels in functions like plot_confusion_matrix.

helpers.cumulative_gain_curve

Generate the data points necessary to plot the Cumulative Gain curve for binary classification tasks.

helpers.binary_ks_curve

Generate the data points necessary to plot the Kolmogorov-Smirnov (KS) curve for binary classification tasks.

helpers.sigmoid

Compute the sigmoid function for the input array x.

helpers.softmax

Compute the softmax function for each row of the input array x.