Package: mlr3resampling 2026.6.12

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.6.12.tar.gz
mlr3resampling_2026.6.12.zip(r-4.7)mlr3resampling_2026.6.12.zip(r-4.6)mlr3resampling_2026.6.12.zip(r-4.5)
mlr3resampling_2026.6.12.tgz(r-4.6-x86_64)mlr3resampling_2026.6.12.tgz(r-4.6-arm64)mlr3resampling_2026.6.12.tgz(r-4.5-x86_64)mlr3resampling_2026.6.12.tgz(r-4.5-arm64)
mlr3resampling_2026.6.12.tar.gz(r-4.7-arm64)mlr3resampling_2026.6.12.tar.gz(r-4.7-x86_64)mlr3resampling_2026.6.12.tar.gz(r-4.6-arm64)mlr3resampling_2026.6.12.tar.gz(r-4.6-x86_64)
mlr3resampling_2026.6.12.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.40 score 6 stars 7 scripts 596 downloads 17 exports 27 dependencies

Last updated from:3da4ef08f8. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK213
linux-devel-x86_64OK230
source / vignettesOK415
linux-release-arm64OK208
linux-release-x86_64OK266
macos-release-arm64OK162
macos-release-x86_64OK344
macos-oldrel-arm64OK132
macos-oldrel-x86_64OK345
windows-develOK194
windows-releaseOK185
windows-oldrelOK183
wasm-releaseOK160

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-05-19
Started: 2026-05-14

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-05-19
Started: 2026-04-13

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-05-15
Started: 2026-05-09

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

Last update: 2026-05-15
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-05-15
Started: 2024-05-14