Learn R Programming

MLwrap (version 0.3.0)

plot_confusion_matrix: Plotting Confusion Matrix

Description

The plot_confusion_matrix() function generates confusion matrices from classification predictions displaying the contingency table of true class labels versus predicted class labels. Visualizes true positives, true negatives, false positives, and false negatives for both training and test sets, enabling computation of derived performance metrics (sensitivity, specificity, precision, F1-score) and identification of specific class pair misclassification patterns.

Usage

plot_confusion_matrix(analysis_object)

Value

analysis_object

Arguments

analysis_object

Fitted analysis_object with 'fine_tuning()'.

See Also

plot_calibration_curve

Examples

Run this code
# Note: For obtaining confusion matrix plot the user needs to
# complete till fine_tuning( ) function of the MLwrap pipeline and
# only with categorical outcome.
# See the full pipeline example under plot_calibration_curve()
# Final call signature:
# plot_confusion_matrix(wrap_object)

Run the code above in your browser using DataLab