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@d71ac72', 'mlr-org/mlr3db@04d84e2', 'mlr-org/mlr3filters@b288dac', 'mlr-org/mlr3learners@6dc9ef6', 'mlr-org/mlr3misc@dc460e6', 'mlr-org/mlr3ordinal@58ad848', 'mlr-org/mlr3pipelines@f78ea55', 'mlr-org/mlr3spatiotemporal@1d3ba2f', 'mlr-org/mlr3survival@03388f3', 'mlr-org/mlr3tuning@088b591', 'mlr-org/mlr3viz@a68cf1f', 'mlr-org/paradox@4bad616', 'R 3.6.0'), force = TRUE)