-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.Rmd
97 lines (71 loc) · 2.63 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# mlr3summary
Package website: [release](https://mlr3summary.mlr-org.com/) \| [dev](https://mlr3summary.mlr-org.com/dev/)
<!-- badges: start -->
[![r-cmd-check](https://github.com/mlr-org/mlr3summary/actions/workflows/rcmdcheck.yaml/badge.svg)](https://github.com/mlr-org/mlr3summary/actions/workflows/rcmdcheck.yaml)
[![CRAN status](https://www.r-pkg.org/badges/version/mlr3summary)](https://CRAN.R-project.org/package=mlr3summary)
[![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/)
<!-- badges: end -->
Concise, informative summaries of machine learning models.
Based on [mlr3](https://github.com/mlr-org/mlr3).
Inspired by the summary output of (generalized) linear models.
## Installation
Install the last release from CRAN:
```{r, eval = FALSE}
install.packages("mlr3summary")
```
Install the development version from GitHub:
```{r, eval = FALSE}
# install.packages("pak")
pak::pak("mlr-org/mlr3summary")
```
## Example
### Load data and create a task
```{r, eval = FALSE}
library(mlr3summary)
data("credit", package = "mlr3summary")
task = as_task_classif(credit, target = "risk", positive = "good")
```
### Fit a model and resampling strategy
```{r, eval = FALSE}
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
```{r, eval = FALSE}
summary(object = rf, resample_result = rr)
```
![summary_output](https://github.com/slds-lmu/mlr3summary/assets/25373845/84b6cf8f-72d6-42ae-8218-5df1623008a3)
More examples can be found in [demo/](https://github.com/mlr-org/mlr3summary/tree/master/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
```bibtex
@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}
}
```