Learn R Programming

fastml (version 0.5.0)

summary.fastml_model: Summary Function for fastml_model (Using yardstick for ROC Curves)

Description

Provides a concise, user-friendly summary of model performances. For classification: - Shows Accuracy, F1 Score, Kappa, Precision, ROC AUC, Sensitivity, Specificity. - Produces a bar plot of these metrics. - Shows ROC curves for binary classification using yardstick::roc_curve(). - Displays a confusion matrix and a calibration plot if probabilities are available.

Usage

# S3 method for fastml_model
summary(
  object,
  algorithm = "best",
  sort_metric = NULL,
  plot = TRUE,
  notes = "",
  ...
)

Value

Prints summary and plots if requested.

Arguments

object

An object of class fastml_model.

algorithm

A vector of algorithm names to display summary. Default is "best".

sort_metric

The metric to sort by. Default uses optimized metric.

plot

Logical. If TRUE, produce bar plot, yardstick-based ROC curves (for binary classification), confusion matrix (classification), smooth calibration plot (if probabilities), and residual plots (regression).

notes

User-defined commentary.

...

Additional arguments.

Details

For regression: - Shows RMSE, R-squared, and MAE. - Produces a bar plot of these metrics. - Displays residual diagnostics (truth vs predicted, residual distribution).