Performance assessment

Lastly, once we make our model using our desired algorithm, it is important to measure its performance. The sklearn.metrics module is useful for this. As discussed in Chapter 3, Machine Learning Foundations, the confusion matrix is particularly important for classification tasks, and it is supported by the sklearn.metrics.confusion_matrix() function. Determining the receiver operating characteristic (ROC) curve and calculating the area under the curve (AUC) can be accomplished using the sklearn.metrics.roc_curve() and sklearn.metrics.roc_auc_score() functions, respectively. Precision-recall curves are an alternative to the ROC curve that are important for imbalanced datasets, and they are supported by the sklearn.metrics.precision_recall_curve() function.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset