Learn R Programming

mlr3viz

Package website: release | dev

mlr3viz is the visualization package of the mlr3 ecosystem. It features plots for mlr3 objects such as tasks, learners, predictions, benchmark results, tuning instances and filters via the autoplot() generic of ggplot2. The package draws plots with the viridis color palette and applies the minimal theme. Visualizations include barplots, boxplots, histograms, ROC curves, and Precision-Recall curves.

The gallery features a showcase post of the plots in mlr3viz.

Installation

Install the last release from CRAN:

install.packages("mlr3")

Install the development version from GitHub:

remotes::install_github("mlr-org/mlr3viz")

Resources

The gallery features a showcase post of the visualization functions mlr3viz.

Short Demo

library(mlr3)
library(mlr3viz)

task = tsk("pima")
learner = lrn("classif.rpart", predict_type = "prob")
rr = resample(task, learner, rsmp("cv", folds = 3), store_models = TRUE)

# Default plot for task
autoplot(task, type = "target")

# ROC curve for resample result
autoplot(rr, type = "roc")

For more example plots you can have a look at the pkgdown references of the respective functions.

Copy Link

Version

Install

install.packages('mlr3viz')

Monthly Downloads

4,111

Version

0.10.1

License

LGPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Marc Becker

Last Published

January 16th, 2025

Functions in mlr3viz (0.10.1)

autoplot.LearnerClustHierarchical

Plots for Hierarchical Clustering Learners
autoplot.PredictionClust

Plots for Cluster Predictions
autoplot.TaskClust

Plots for Clustering Tasks
autoplot.TaskRegr

Plots for Regression Tasks
autoplot.ResampleResult

Plots for Resample Results
autoplot.Filter

Plots for Filter Scores
autoplot.TaskClassif

Plots for Classification Tasks
as_precrec

Convert to 'precrec' Format
autoplot.TuningInstanceBatchSingleCrit

Plots for Tuning Instances
autoplot.OptimInstanceBatchSingleCrit

Plots for Optimization Instances
mlr3viz-package

mlr3viz: Visualizations for 'mlr3'
autoplot.PredictionRegr

Plots for Regression Predictions
autoplot.BenchmarkResult

Plots for Benchmark Results
autoplot.PredictionClassif

Plots for Classification Predictions
reexports

Objects exported from other packages
plot_learner_prediction

Plots for Learner Predictions
predict_grid

Generates a data.table of evenly distributed points.
autoplot.EnsembleFSResult

Plots for Ensemble Feature Selection Results
autoplot.LearnerRegr

Plot for Regression Learners
autoplot.LearnerClassifCVGlmnet

Plots for GLMNet Learners
autoplot.LearnerClassif

Plot for Classification Learners
autoplot.LearnerSurvCoxPH

Plots for Cox Proportional Hazards Learner
autoplot.LearnerClassifRpart

Plots for Rpart Learners