1 Quickstart

As a 30-second introductory example, we will train a decision tree model on the first 120 rows of iris data set and make predictions on the final 30, measuring the accuracy of the trained model.

The code examples in this book use a few additional packages that are not installed by default if you install mlr3. To run all examples in the book, install the mlr3book package using the remotes package:

In most cases you do not want to run all code blocks of the book but just some parts of it. In these cases it is easiest to install the mlr3verse pkg (a wrapper package for the core packages of the mlr3 package framework) and install missing packages for specific sections as needed.

Sometimes certain packages of the mlr3verse are ahead of the code examples in the book. If you want to install the state of packages which correspond to the latest published version of the book, use

## [1] remotes::install_github(c('mlr-org/mlr3@cbb4584', 'mlr-org/mlr3db@d8da02f', 'mlr-org/mlr3filters@dbbc56f', 'mlr-org/mlr3learners@f87c17b', 'mlr-org/mlr3misc@877e5ab', 'mlr-org/mlr3ordinal@c66278d', 'mlr-org/mlr3pipelines@c2b5c5b', 'mlr-org/mlr3spatiotemporal@39c3b5b', 'mlr-org/mlr3survival@25ab232', 'mlr-org/mlr3tuning@7f08e05', 'mlr-org/mlr3viz@d29925a', 'mlr-org/paradox@4c1f5cb'), force = TRUE)