API Reference#

This is the class and function reference of scikit-learn. Please refer to the full user guide for further details, as the raw specifications of classes and functions may not be enough to give full guidelines on their uses. For reference on concepts repeated across the API, see Glossary of Common Terms and API Elements.

Object

Description

show_versions

Print useful debugging information

plot_elbow

Plot the elbow curve for different values of K in KMeans clustering.

plot_cumulative_gain

Generates the Cumulative Gains Plot from labels and scores/probabilities.

plot_lift

Generate a Lift Curve from true labels and predicted probabilities.

plot_ks_statistic

Generates the KS Statistic plot from labels and scores/probabilities.

plot_pca_component_variance

Plots PCA components’ explained variance ratios. (new in v0.2.2)

plot_pca_2d_projection

Plots the 2-dimensional projection of PCA on a given dataset.

plot_feature_importances

Generates a plot of a sklearn model’s feature importances.

plot_learning_curve

Generates a plot of the train and test learning curves for a classifier.

print_labels

A legend for the abbreviations of decile table column names.

decile_table

Generates the Decile Table from labels and probabilities

plot_cumulative_gain

Generates the Decile-wise Lift Plot from labels and probabilities

plot_lift

Generates the Decile based cumulative Lift Plot from labels and probabilities

plot_lift_decile_wise

Generates the Decile-wise Lift Plot from labels and probabilities

plot_ks_statistic

Generates the KS Statistic Plot from labels and probabilities

report

Generates a decile table and four plots:

plot_calibration_curve

Plot calibration curves for a set of classifier probability estimates.

plot_classifier_eval

Generates various evaluation plots for a classifier, including confusion matrix, precision-recall curve, and ROC curve.

plot_confusion_matrix

Generates a confusion matrix plot from predictions and true labels.

plot_roc

Generates the ROC AUC curves from labels and predicted scores/probabilities.

plot_precision_recall

Generates the Precision-Recall AUC Curves from labels and predicted scores/probabilities.

plot_silhouette

Plots silhouette analysis of clusters provided.

ModelPlotPy

Create a model_plots object

plot_response

Plotting response curve

plot_cumresponse

Plotting cumulative response curve

plot_cumlift

Plotting cumulative lift curve

plot_cumgains

Plotting cumulative gains curve

plot_all

Plotting cumulative gains curve

plot_costsrevs

Plotting costs / revenue curve

plot_profit

Plotting profit curve

plot_roi

Plotting ROI curve

range01

Normalizing input

check_input

Check if the input matches any of a complete list

combine_and_save_figures

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

validate_labels

Validates the labels passed into arguments such as true_labels or pred_labels

cumulative_gain_curve

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

binary_ks_curve

Generate the data points necessary to plot the Kolmogorov-Smirnov (KS)

sigmoid

Compute the sigmoid function for the input array x.

softmax

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

plot_roc_curve

Generates the ROC curves from labels and predicted scores/probabilities

plot_precision_recall_curve

Generates the Precision Recall Curve from labels and probabilities

classifiers

This package/module is designed to be compatible with both Python 2 and Python 3.

clustering

This package/module is designed to be compatible with both Python 2 and Python 3.

plotters

This package/module is designed to be compatible with both Python 2 and Python 3.