Skip to contents

Package website: release | dev

Concise, informative summaries of machine learning models. Based on mlr3. Inspired by the summary output of (generalized) linear models.

Installation

Install the last release from CRAN:

install.packages("mlr3summary")

Install the development version from GitHub:

# install.packages("pak")
pak::pak("mlr-org/mlr3summary")

Example

Load data and create a task

library(mlr3summary)
data("credit", package = "mlr3summary")
task = as_task_classif(credit, target = "risk", positive = "good")

Fit a model and resampling strategy

set.seed(12005L)
rf = lrn("classif.ranger", predict_type = "prob")
rf$train(task)

cv3 = rsmp("cv", folds = 3L)
rr = resample(task = task, learner = rf, resampling = cv3, store_models = TRUE)
rr$aggregate(msrs(list("classif.acc", "classif.auc")))

Apply the summary function

summary(object = rf, resample_result = rr)
summary_output

More examples can be found in demo/.

Citation

If you use mlr3summary, please cite:

Dandl S, Becker M, Bischl B, Casalicchio G, Bothmann L (2024).
mlr3summary: Model and learner summaries for 'mlr3'.
R package version 0.1.0.

A BibTeX entry for LaTeX users is

@Manual{
  title = {mlr3summary: Model and learner summaries for 'mlr3'},
  author = {Susanne Dandl and Marc Becker and Bernd Bischl and Giuseppe Casalicchio and Ludwig Bothmann},
  year = {2024},
  note = {R package version 0.1.0}
}