scikit-plotΒΆ

Links: notebook, html, python, slides, GitHub

scikit-plot is an extension of matplotlib for datascientist. Proposed graphs are a frequent need when playing with data.

documentation source installation tutorial

%matplotlib inline
from sklearn.datasets import load_iris
data= load_iris()
X, y = data.data, data.target
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y)
import scikitplot as skplt
from sklearn.linear_model import LogisticRegression
nb = LogisticRegression(solver='lbfgs', multi_class='ovr')
nb = nb.fit(X_train, y_train)
y_probas = nb.predict_proba(X_test)
skplt.metrics.plot_roc(y_test, y_probas);
../_images/im_scikit_plot_5_0.png