October 2018
Intermediate to advanced
172 pages
4h 6m
English
The K-S statistic plot, or the Kolmogorov Smirnov statistic plot, is a plot that tells you whether the model gets confused when it comes to predicting the different labels in your dataset. In order to illustrate what the term confused means in this case, we will construct the K-S statistic plot for the K-NN model by using the following code:
#KS plot for the K-NN modeltarget_proba = knn_classifier.predict_proba(X_test)skplt.metrics.plot_ks_statistic(y_test, target_proba)plt.show()
This results in the following plot:

In the preceding plot, the following applies:
Read now
Unlock full access