Package: mlr3resampling 2026.9.24

mlr3resampling: Resampling Algorithms for 'mlr3' Framework

A supervised learning algorithm inputs a train set, and outputs a prediction function, which can be used on a test set. If each data point belongs to a subset (such as geographic region, year, etc), then how do we know if subsets are similar enough so that we can get accurate predictions on one subset, after training on Other subsets? And how do we know if training on All subsets would improve prediction accuracy, relative to training on the Same subset? SOAK, Same/Other/All K-fold cross-validation, <doi:10.1002/sam.70055> can be used to answer these questions, by fixing a test subset, training models on Same/Other/All subsets, and then comparing test error rates (Same versus Other and Same versus All). Also provides code for estimating how many train samples are required to get accurate predictions on a test set.

Authors:Toby Hocking [aut, cre], Daniel Agyapong [ctb], Michel Lang [ctb], Bernd Bischl [ctb], Jakob Richter [ctb], Patrick Schratz [ctb], Giuseppe Casalicchio [ctb], Stefan Coors [ctb], Quay Au [ctb], Martin Binder [ctb], Florian Pfisterer [ctb], Raphael Sonabend [ctb], Lennart Schneider [ctb], Marc Becker [ctb], Sebastian Fischer [ctb]

mlr3resampling_2026.9.24.tar.gz
mlr3resampling_2026.9.24.zip(r-4.7-x86_64)mlr3resampling_2026.9.24.zip(r-4.7-arm64)mlr3resampling_2026.9.24.zip(r-4.6-x86_64)mlr3resampling_2026.9.24.zip(r-4.6-arm64)mlr3resampling_2026.9.24.zip(r-4.5-x86_64)
mlr3resampling_2026.9.24.tgz(r-4.6-x86_64)mlr3resampling_2026.9.24.tgz(r-4.6-arm64)mlr3resampling_2026.9.24.tgz(r-4.5-x86_64)mlr3resampling_2026.9.24.tgz(r-4.5-arm64)
mlr3resampling_2026.9.24.tar.gz(r-4.7-arm64)mlr3resampling_2026.9.24.tar.gz(r-4.7-x86_64)mlr3resampling_2026.9.24.tar.gz(r-4.6-arm64)mlr3resampling_2026.9.24.tar.gz(r-4.6-x86_64)
mlr3resampling_2026.9.24.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
mlr3resampling/json (API)

# Install 'mlr3resampling' in R:
install.packages('mlr3resampling', repos = c('https://tdhock.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/tdhock/mlr3resampling/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

Conda:

cpp

6.42 score 7 stars 7 scripts 531 downloads 17 exports 27 dependencies

Last updated from:40c881de5d. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK212
linux-devel-x86_64OK201
source / vignettesOK406
linux-release-arm64OK170
linux-release-x86_64OK203
macos-release-arm64OK189
macos-release-x86_64OK258
macos-oldrel-arm64OK148
macos-oldrel-x86_64OK445
windows-devel-arm64OK288
windows-devel-x86_64OK182
windows-release-arm64OK307
windows-release-x86_64OK293
windows-oldrel-x86_64OK245
wasm-releaseOK140

Exports:AutoTunerTorch_epochsLearnerClassifCVGlmnetSaveLearnerRegrCVGlmnetSaveproj_computeproj_compute_allproj_compute_mpiproj_freadproj_gridproj_resultsproj_results_saveproj_submitproj_testproj_todopvaluepvalue_downsampleResamplingSameOtherSizesCVscore

Dependencies:backportscheckmateclicodetoolsdata.tabledigestevaluatefuturefuture.applyglobalslgrlistenvmiraimlbenchmlr3mlr3measuresmlr3miscnanonextpalmerpenguinsparadoxparallellyPRROCR6RcppRcppArmadillorlanguuid

1 Demonstration of SOAKED on simulations
Simulations | mlr3 benchmark | Downsample analysis | iid easy task | different task | Conclusion | Stop future background workers

Last update: 2026-09-24
Started: 2026-05-14

2 Using subset with group and stratum
Introduction: role definitions | Example using AZtrees data | Cross-validation with no column roles | Cross-validation using strata | Cross-validation on polygons | Cross-validation on polygons with strata | Cross-validation with subsets, strata, and groups | Example using respiratory data | Are models consistent across sex? | Are models consistent across centers? | Conclusion

Last update: 2026-09-24
Started: 2026-05-09

3 Benchmarking projects
Introduction: tasks, learners, resampling | Resampling | Tasks | Learners | Define the grid of combinations | Previous method, mlr3::benchmark_grid() | Proposed method, mlr3resampling::proj_grid() | Testing | Testing one job | Test one job for each algo and data set | Running all jobs locally (small benchmarks) | Running all jobs on a cluster (large benchmarks) | Previous method, batchtools | Proposed method, mlr3resampling::proj_submit() | Results comparison | Accuracy measures | Computation time | New features | New edit_learner() method for quick testing | New save_learner() method for model interpretation | New Task down-sampling | Conclusion | Stop future background workers

Last update: 2026-09-24
Started: 2026-04-13

4 Reproducible benchmarks
Introduction | Example | Demonstration with test project | Demonstration with full benchmark | Do it yourself | Comparison with batchtools | Conclusion

Last update: 2026-09-24
Started: 2026-04-21

5 Newer resamplers
Simulations | Comparing training on Same/Other/All subsets | Downsample to see how many train data are required for good accuracy overall | Reproducibility | Reproducing K-fold CV for largest train size | Reproducing each split | Downsample to sizes of other sets | Use with auto_tuner on a task with stratification and grouping | Conclusions | Arizona trees data | What is a group? | What is a subset? | Cross-validation | Benchmark and test error computation | Conclusion | Session info

Last update: 2026-09-24
Started: 2024-05-14