In this report, I'll show you how to visualize your scikit-learn model's performance with just a few lines of code. We’ll also explore how each of these plots help us understand our model better.
Creating these plots is simple.
import wandb wandb.init(project="visualize-sklearn")
# Visualize single plot wandb.sklearn.plot_confusion_matrix(y_true, y_probas, labels)
# Visualize all the plots in the Classification section below with one line of code wandb.sklearn.plot_classifier(clf, X_train, X_test, y_train, y_test, y_pred, y_probas, labels, model_name='SVC', feature_names=None) # Visualize all the plots in the Regression section below with one line of code wandb.sklearn.plot_regressor(reg, X_train, X_test, y_train, y_test, model_name='Ridge') # Visualize all the plots in the Clustering section below with one line of code wandb.sklearn.plot_clusterer(kmeans, X_train, cluster_labels, labels=None, model_name='KMeans')
If you have any questions, we'd love to answer them in our slack community.
In this report, I trained several models on the Titanic dataset, which describes the passengers aboard the Titanic. Our goal is to predict whether the passenger survived or not.