Skip to content

Commit 75d2dd9

Browse files
committed
Deploying to gh-pages from @ 18a5299 🚀
1 parent b3f3034 commit 75d2dd9

36 files changed

+1762
-130
lines changed

dev/LICENSE-text.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/LICENSE-text.md

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
# License
2+
3+
GNU LESSER GENERAL PUBLIC LICENSE
4+
Version 3, 29 June 2007
5+
6+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
7+
Everyone is permitted to copy and distribute verbatim copies
8+
of this license document, but changing it is not allowed.
9+
10+
11+
This version of the GNU Lesser General Public License incorporates
12+
the terms and conditions of version 3 of the GNU General Public
13+
License, supplemented by the additional permissions listed below.
14+
15+
0. Additional Definitions.
16+
17+
As used herein, "this License" refers to version 3 of the GNU Lesser
18+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
19+
General Public License.
20+
21+
"The Library" refers to a covered work governed by this License,
22+
other than an Application or a Combined Work as defined below.
23+
24+
An "Application" is any work that makes use of an interface provided
25+
by the Library, but which is not otherwise based on the Library.
26+
Defining a subclass of a class defined by the Library is deemed a mode
27+
of using an interface provided by the Library.
28+
29+
A "Combined Work" is a work produced by combining or linking an
30+
Application with the Library. The particular version of the Library
31+
with which the Combined Work was made is also called the "Linked
32+
Version".
33+
34+
The "Minimal Corresponding Source" for a Combined Work means the
35+
Corresponding Source for the Combined Work, excluding any source code
36+
for portions of the Combined Work that, considered in isolation, are
37+
based on the Application, and not on the Linked Version.
38+
39+
The "Corresponding Application Code" for a Combined Work means the
40+
object code and/or source code for the Application, including any data
41+
and utility programs needed for reproducing the Combined Work from the
42+
Application, but excluding the System Libraries of the Combined Work.
43+
44+
1. Exception to Section 3 of the GNU GPL.
45+
46+
You may convey a covered work under sections 3 and 4 of this License
47+
without being bound by section 3 of the GNU GPL.
48+
49+
2. Conveying Modified Versions.
50+
51+
If you modify a copy of the Library, and, in your modifications, a
52+
facility refers to a function or data to be supplied by an Application
53+
that uses the facility (other than as an argument passed when the
54+
facility is invoked), then you may convey a copy of the modified
55+
version:
56+
57+
a) under this License, provided that you make a good faith effort to
58+
ensure that, in the event an Application does not supply the
59+
function or data, the facility still operates, and performs
60+
whatever part of its purpose remains meaningful, or
61+
62+
b) under the GNU GPL, with none of the additional permissions of
63+
this License applicable to that copy.
64+
65+
3. Object Code Incorporating Material from Library Header Files.
66+
67+
The object code form of an Application may incorporate material from
68+
a header file that is part of the Library. You may convey such object
69+
code under terms of your choice, provided that, if the incorporated
70+
material is not limited to numerical parameters, data structure
71+
layouts and accessors, or small macros, inline functions and templates
72+
(ten or fewer lines in length), you do both of the following:
73+
74+
a) Give prominent notice with each copy of the object code that the
75+
Library is used in it and that the Library and its use are
76+
covered by this License.
77+
78+
b) Accompany the object code with a copy of the GNU GPL and this license
79+
document.
80+
81+
4. Combined Works.
82+
83+
You may convey a Combined Work under terms of your choice that,
84+
taken together, effectively do not restrict modification of the
85+
portions of the Library contained in the Combined Work and reverse
86+
engineering for debugging such modifications, if you also do each of
87+
the following:
88+
89+
a) Give prominent notice with each copy of the Combined Work that
90+
the Library is used in it and that the Library and its use are
91+
covered by this License.
92+
93+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
94+
document.
95+
96+
c) For a Combined Work that displays copyright notices during
97+
execution, include the copyright notice for the Library among
98+
these notices, as well as a reference directing the user to the
99+
copies of the GNU GPL and this license document.
100+
101+
d) Do one of the following:
102+
103+
0) Convey the Minimal Corresponding Source under the terms of this
104+
License, and the Corresponding Application Code in a form
105+
suitable for, and under terms that permit, the user to
106+
recombine or relink the Application with a modified version of
107+
the Linked Version to produce a modified Combined Work, in the
108+
manner specified by section 6 of the GNU GPL for conveying
109+
Corresponding Source.
110+
111+
1) Use a suitable shared library mechanism for linking with the
112+
Library. A suitable mechanism is one that (a) uses at run time
113+
a copy of the Library already present on the user's computer
114+
system, and (b) will operate properly with a modified version
115+
of the Library that is interface-compatible with the Linked
116+
Version.
117+
118+
e) Provide Installation Information, but only if you would otherwise
119+
be required to provide such information under section 6 of the
120+
GNU GPL, and only to the extent that such information is
121+
necessary to install and execute a modified version of the
122+
Combined Work produced by recombining or relinking the
123+
Application with a modified version of the Linked Version. (If
124+
you use option 4d0, the Installation Information must accompany
125+
the Minimal Corresponding Source and Corresponding Application
126+
Code. If you use option 4d1, you must provide the Installation
127+
Information in the manner specified by section 6 of the GNU GPL
128+
for conveying Corresponding Source.)
129+
130+
5. Combined Libraries.
131+
132+
You may place library facilities that are a work based on the
133+
Library side by side in a single library together with other library
134+
facilities that are not Applications and are not covered by this
135+
License, and convey such a combined library under terms of your
136+
choice, if you do both of the following:
137+
138+
a) Accompany the combined library with a copy of the same work based
139+
on the Library, uncombined with any other library facilities,
140+
conveyed under the terms of this License.
141+
142+
b) Give prominent notice with the combined library that part of it
143+
is a work based on the Library, and explaining where to find the
144+
accompanying uncombined form of the same work.
145+
146+
6. Revised Versions of the GNU Lesser General Public License.
147+
148+
The Free Software Foundation may publish revised and/or new versions
149+
of the GNU Lesser General Public License from time to time. Such new
150+
versions will be similar in spirit to the present version, but may
151+
differ in detail to address new problems or concerns.
152+
153+
Each version is given a distinguishing version number. If the
154+
Library as you received it specifies that a certain numbered version
155+
of the GNU Lesser General Public License "or any later version"
156+
applies to it, you have the option of following the terms and
157+
conditions either of that published version or of any later version
158+
published by the Free Software Foundation. If the Library as you
159+
received it does not specify a version number of the GNU Lesser
160+
General Public License, you may choose any version of the GNU Lesser
161+
General Public License ever published by the Free Software Foundation.
162+
163+
If the Library as you received it specifies that a proxy can decide
164+
whether future versions of the GNU Lesser General Public License shall
165+
apply, that proxy's public statement of acceptance of any version is
166+
permanent authorization for you to choose that version for the
167+
Library.

dev/authors.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/authors.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Authors and Citation
2+
3+
## Authors
4+
5+
- **Sebastian Fischer**. Maintainer, author.
6+
[](https://orcid.org/0000-0002-9609-3197)
7+
8+
- **Hannah Schulz-Kümpel**. Author.
9+
[](https://orcid.org/0000-0003-3972-8392)
10+
11+
## Citation
12+
13+
Source:
14+
[`DESCRIPTION`](https://github.com/mlr-org/mlr3inferr/blob/main/DESCRIPTION)
15+
16+
Fischer S, Schulz-Kümpel H (2025). *mlr3inferr: Inference on the
17+
Generalization Error*. R package version 0.2.0.9000,
18+
<https://mlr3inferr.mlr-org.com>.
19+
20+
@Manual{,
21+
title = {mlr3inferr: Inference on the Generalization Error},
22+
author = {Sebastian Fischer and Hannah Schulz-Kümpel},
23+
year = {2025},
24+
note = {R package version 0.2.0.9000},
25+
url = {https://mlr3inferr.mlr-org.com},
26+
}

dev/deps/bootstrap-5.3.1/bootstrap.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/index.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/index.md

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# mlr3inferr
2+
3+
Methods for statistical **inf**erence on the generalization **err**or.
4+
5+
Package website: [release](https://mlr3inferr.mlr-org.com/) \|
6+
[dev](https://mlr3inferr.mlr-org.com/dev/)
7+
8+
## Installation
9+
10+
``` r
11+
# Install release from CRAN
12+
install.packages("mlr3inferr")
13+
# Install development version from GitHub
14+
pak::pkg_install("mlr-org/mlr3inferr")
15+
```
16+
17+
## What is `mlr3inferr`?
18+
19+
The main purpose of the package is to allow to obtain confidence
20+
intervals for the generalization error for a number of resampling
21+
methods. Below, we evaluate a decision tree on the sonar task using a
22+
holdout resampling and obtain a confidence interval for the
23+
generalization error. This is achieved using the `msr("ci.holdout")`
24+
measure, to which we pass another
25+
[`mlr3::Measure`](https://mlr3.mlr-org.com/reference/Measure.html) that
26+
determines the loss function.
27+
28+
``` r
29+
library(mlr3inferr)
30+
31+
rr = resample(tsk("sonar"), lrn("classif.rpart"), rsmp("holdout"))
32+
# 0.05 is also the default
33+
ci = msr("ci.holdout", "classif.acc", alpha = 0.05)
34+
rr$aggregate(ci)
35+
#> classif.acc classif.acc.lower classif.acc.upper
36+
#> 0.7391304 0.6347628 0.8434981
37+
```
38+
39+
It is also possible to select the default inference method for a certain
40+
`Resampling` method using `msr("ci")`
41+
42+
``` r
43+
ci_default = msr("ci", "classif.acc")
44+
rr$aggregate(ci_default)
45+
#> classif.acc classif.acc.lower classif.acc.upper
46+
#> 0.7391304 0.6347628 0.8434981
47+
```
48+
49+
With [`mlr3viz`](https://mlr3viz.mlr-org.com), it is also possible to
50+
visualize multiple confidence intervals. Below, we compare a random
51+
forest with a decision tree and a featureless learner:
52+
53+
``` r
54+
library(mlr3learners)
55+
library(mlr3viz)
56+
57+
bmr = benchmark(benchmark_grid(
58+
tsks(c("sonar", "german_credit")),
59+
lrns(c("classif.rpart", "classif.ranger", "classif.featureless")),
60+
rsmp("subsampling")
61+
))
62+
63+
autoplot(bmr, "ci", msr("ci", "classif.ce"))
64+
```
65+
66+
![](reference/figures/README-unnamed-chunk-5-1.png)
67+
68+
Note that:
69+
70+
- Some methods require pointwise loss functions, i.e. have an
71+
`$obs_loss` field.
72+
- Not for every resampling method exists an inference method.
73+
- There are combinations of datasets and learners, where inference
74+
methods can fail.
75+
76+
⚠️ **Different point estimates for the same measure**
77+
78+
In general, the point estimate of `$aggregate(msr("ci", <key>))` will
79+
**not** always be exactly identical to the point estimate of
80+
`$aggregate(msr(<key>))`. This is because the point estimation for the
81+
former is defined by the inference method, and can, for example, as is
82+
the case for nested cross-validation, contain a bias correction term, or
83+
use a different aggregation method. This is demonstrated in the example
84+
below.
85+
86+
``` r
87+
rr = resample(tsk("iris"), lrn("classif.rpart"), rsmp("ncv", folds = 5L, repeats = 20L))
88+
ce = msr("classif.ce")
89+
ci = msr("ci", ce)
90+
c(rr$aggregate(ce)[[1]], rr$aggregate(ci)[[1]])
91+
#> [1] 0.06466667 0.06646667
92+
```
93+
94+
## Features
95+
96+
- Additional Resampling Methods
97+
- Confidence Intervals for the Generalization Error for some resampling
98+
methods
99+
100+
## Inference Methods
101+
102+
| Key | Label | Resamplings | Only Pointwise Loss |
103+
|:-----------|:------------------------|:------------------|:--------------------|
104+
| ci.con_z | Conservative-Z Interval | PairedSubsampling | false |
105+
| ci.cor_t | Corrected-T Interval | Subsampling | false |
106+
| ci.holdout | Holdout Interval | Holdout | yes |
107+
| ci.ncv | Nested CV Interval | NestedCV | yes |
108+
| ci.wald_cv | Wald CV Interval | CV, LOO | yes |
109+
110+
## Citing mlr3
111+
112+
If you use mlr3inferr, please cite our paper:
113+
114+
``` R
115+
@misc{kuempelfischer2024ciforge,
116+
title={Constructing Confidence Intervals for 'the' Generalization Error -- a Comprehensive Benchmark Study},
117+
author={Hannah Schulz-Kümpel and Sebastian Fischer and Thomas Nagler and Anne-Laure Boulesteix and Bernd Bischl and Roman Hornung},
118+
year={2024},
119+
eprint={2409.18836},
120+
archivePrefix={arXiv},
121+
primaryClass={stat.ML},
122+
url={https://arxiv.org/abs/2409.18836},
123+
}
124+
```
125+
126+
## Acknowledgements
127+
128+
This R package is developed as part of the [Mathematical Research Data
129+
Initiative](https://www.mardi4nfdi.de/about/mission).
130+
131+
## Bugs, Questions, Feedback
132+
133+
*mlr3inferr* is a free and open source software project that encourages
134+
participation and feedback. If you have any issues, questions,
135+
suggestions or feedback, please do not hesitate to open an “issue” about
136+
it on the GitHub page!
137+
138+
In case of problems / bugs, it is often helpful if you provide a
139+
“minimum working example” that showcases the behaviour (but don’t worry
140+
about this if the bug is obvious).
141+
142+
Please understand that the resources of the project are limited:
143+
response may sometimes be delayed by a few days, and some feature
144+
suggestions may be rejected if they are deemed too tangential to the
145+
vision behind the project.

dev/katex-auto.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ document.addEventListener("DOMContentLoaded", function () {
1111
macros: macros,
1212
fleqn: false
1313
});
14-
}}});
14+
}
15+
}
16+
});

dev/lightswitch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const setTheme = theme => {
2626
}
2727
}
2828

29-
function bsSetupThemeToggle () {
29+
function bsSetupThemeToggle() {
3030
'use strict'
3131

3232
const showActiveTheme = (theme, focus = false) => {
@@ -35,7 +35,7 @@ function bsSetupThemeToggle () {
3535
document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
3636
const buttonTheme = element.getAttribute('data-bs-theme-value')
3737
const isActive = buttonTheme == theme
38-
38+
3939
element.classList.toggle('active', isActive)
4040
element.setAttribute('aria-pressed', isActive)
4141

0 commit comments

Comments
 (0)