Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mlr-org/mlr3viz

Visualizations for mlr3
https://github.com/mlr-org/mlr3viz

ggplot2 mlr3 r r-package visualization visualizations

Last synced: about 23 hours ago
JSON representation

Visualizations for mlr3

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
lgr::get_logger("mlr3")$set_threshold("warn")
knitr::opts_chunk$set(fig.path = "man/figures/README-")
knitr::opts_chunk$set(fig.path = "man/figures/README-")
set.seed(1)
options(
datatable.print.nrows = 10,
datatable.print.class = FALSE,
datatable.print.keys = FALSE,
width = 100)
# mute load messages
library("mlr3tuning")
```

# mlr3viz

Package website: [release](https://mlr3viz.mlr-org.com/) | [dev](https://mlr3viz.mlr-org.com/dev/)

[![r-cmd-check](https://github.com/mlr-org/mlr3viz/actions/workflows/r-cmd-check.yml/badge.svg)](https://github.com/mlr-org/mlr3viz/actions/workflows/r-cmd-check.yml)
[![CRAN](https://www.r-pkg.org/badges/version/mlr3viz)](https://cran.r-project.org/package=mlr3viz)
[![StackOverflow](https://img.shields.io/badge/stackoverflow-mlr3-orange.svg)](https://stackoverflow.com/questions/tagged/mlr3)
[![Mattermost](https://img.shields.io/badge/chat-mattermost-orange.svg)](https://lmmisld-lmu-stats-slds.srv.mwn.de/mlr_invite/)

*mlr3viz* is the visualization package of the [mlr3](https://mlr-org.com/) ecosystem.
It features plots for mlr3 objects such as tasks, learners, predictions, benchmark results, tuning instances and filters via the `autoplot()` generic of [ggplot2](https://ggplot2.tidyverse.org/).
The package draws plots with the [viridis](https://CRAN.R-project.org/package=viridisLite) color palette and applies the [minimal theme](https://ggplot2.tidyverse.org/reference/ggtheme.html).
Visualizations include barplots, boxplots, histograms, ROC curves, and Precision-Recall curves.

The [gallery](https://mlr-org.com/gallery/technical/2022-12-22-mlr3viz/) features a **showcase post** of the plots in `mlr3viz`.

## Installation

Install the last release from CRAN:

```{r, eval = FALSE}
install.packages("mlr3")
```

Install the development version from GitHub:

```{r, eval = FALSE}
remotes::install_github("mlr-org/mlr3viz")
```

## Resources

The [gallery](https://mlr-org.com/gallery/technical/2022-12-22-mlr3viz/) features a showcase post of the visualization functions `mlr3viz`.

## Short Demo

```{r demo, message = FALSE, warning = FALSE, dpi=300}
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](https://mlr3viz.mlr-org.com/reference/index.html) of the respective functions.