Skip to contents

Efficient, object-oriented programming on the building blocks of machine learning. Provides 'R6' objects for tasks, learners, resamplings, and measures. The package is geared towards scalability and larger datasets by supporting parallelization and out-of-memory data-backends like databases. While 'mlr3' focuses on the core computational operations, add-on packages provide additional functionality.

Learn mlr3

mlr3 extensions

Suggested packages

Package Options

  • "mlr3.exec_random": Randomize the order of execution in resample() and benchmark() during parallelization with future. Defaults to TRUE. Note that this does not affect the order of results.

  • "mlr3.exec_chunk_size": Number of iterations to perform in a single future::future() during parallelization with future. Defaults to 1.

  • "mlr3.exec_chunk_bins": Number of bins to split the iterations into. If set, "mlr3.exec_chunk_size" is ignored.

  • "mlr3.debug": If set to TRUE, parallelization via future is disabled to simplify debugging and provide more concise tracebacks. Note that results computed in debug mode use a different seeding mechanism and are not reproducible.

  • "mlr3.warn_version_mismatch": Set to FALSE to silence warnings raised during predict if a learner has been trained with a different version version of mlr3.

  • "mlr3.prob_as_default": Set to TRUE to set the predict type of classification learners to "prob" by default (if they support it).

  • "mlr3.mirai_parallelization": Compute profile to use for parallelization with mirai. Defaults to "mlr3_parallelization".

  • "mlr3.mirai_encapsulation": Compute profile to use for encapsulation with mirai. Defaults to "mlr3_encapsulation".

Error Classes

  • Mlr3Error: The base mlr3 error class.

  • Mlr3ErrorConfig: This error signals that the user has misconfigured something. By default, this error is not caught when the learner is encapsulated.

  • Mlr3ErrorInput: This error signals that the input to the function is invalid.

  • Mlr3ErrorLearner: The base error class for errors related to the learner.

  • Mlr3ErrorLearnerTrain: This error signals that the learner failed to train the model.

  • Mlr3ErrorLearnerPredict: This error signals that something went wrong during prediction.

  • Mlr3TimeoutError: This error signals that the encapsulation during train or predict timed out.

Warning Classes

  • Mlr3Warning: The base mlr3 warning class.

  • Mlr3WarningConfig: This warning signals that the user has misconfigured something.

  • Mlr3WarningInput: This warning signals that the input to the function is invalid.

References

Lang M, Binder M, Richter J, Schratz P, Pfisterer F, Coors S, Au Q, Casalicchio G, Kotthoff L, Bischl B (2019). “mlr3: A modern object-oriented machine learning framework in R.” Journal of Open Source Software. doi:10.21105/joss.01903 , https://joss.theoj.org/papers/10.21105/joss.01903.

Author

Maintainer: Marc Becker marcbecker@posteo.de (ORCID)

Authors:

Other contributors: