• Stars
    star
    253
  • Rank 160,776 (Top 4 %)
  • Language
    TeX
  • License
    MIT License
  • Created over 5 years ago
  • Updated 24 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Online version of Bischl, B., Sonabend, R., Kotthoff, L., & Lang, M. (Eds.). (2024). "Applied Machine Learning Using mlr3 in R". CRC Press.

mlr3book

mlr3book StackOverflow Mattermost

Package to build the mlr3 book using quarto.

Rendered Versions

Working on the book

  1. Clone the mlr-org/mlr3book repository.

  2. Currently we need the latest quarto dev version to be able to render mermaid diagrams when rendering to pdf: https://quarto.org/docs/download/prerelease (we need >=1.3.283)

  3. Call make install to initialize the renv virtual environment. The file book/renv.lock records all packages needed to build the book.

  4. To build the book, run one of the following commands:

    # HTML
    quarto render book/ --to html
    
    # PDF
    quarto render book/ --to pdf

    These command use the virtual environment created by renv.

  5. If your change to the book requires a new R package, install the package in the renv environment. For this, start an R session in the book/ directory and install the package with renv::install(). Then call renv::snapshot() to update book/renv.lock. Commit book/renv.lock with your changes to a pull request.

Serve the book

Alternatively, you "serve" the book via a local server:

quarto preview book/

The command above starts a service which automatically (re-)compiles the book sources in the background whenever a file is modified.

Makefile approach

Alternatively, you can use the provided Makefile (c.f. see make help). This way, you can

  • install dependencies
  • build the HTML book -> make html
  • build the PDF book -> make pdf

File system structure

The root directory is a regular R package. The book itself is in the subdirectory "book".

Style Guide

Lists

For lists please use * and not -.

Chunk Names

Chunks are named automatically as [chapter-name]-# by calling name_chunks_mlr3book():

mlr3book::name_chunks_mlr3book()

or alternatively executing make names from the terminal.

Figures

You have to options to include a figure:

  1. Vector graphic
  • In the qmd: knitr::include_graphics("Figures/some_figure.svg")
  • Add book/Figures/some_figure.svg and book/Figures/some_figure.pdf to the repository.
  1. Pixel graphic
  • In the qmd: knitr::include_graphics("Figures/some_figure.png")
  • Add only book/Figures/some_figure.png to the repository.
  • Do not use markdown syntax [](<figure>) to include figures.
  • Do not include pdf in the qmd: knitr::include_graphics("Figures/some_figure.pdf").

Adding a new figure

To add a new figure into the repository consider the following rules:

  • Add the file in the book/images folder without any subdirectory.
  • Store the original figure as a svg file if possible, i.e. if it is a vector graphic. This allows us to re-use or modify images in the future.
  • png files should have reasonable resolution, i.e. the width of a pixel graphic should be between 400px and 2000px. If a higher resolution is needed to obtain a readable plot you are probably doing something wrong, e.g. use a pixel graphic where you should use a vector graphic.
  • Please look at the file size.
    • If your pdf or svg file is larger than 1MB it probably contains unnecessary hidden content or unvectorized parts.
    • If your png file is larger than 1MB the resolution is probably too big.

Adding a new mlr3 package

This allows linking a package using `r packagename`.

  • Add the package to db$hosted in R/zzz.R
  • Export the package by adding a new entry in the end of R\links.R

Further aspects

  • How do I convert svg to pdf?
    • Use Inkscape or any other tool which does not convert to raster images.
  • How do I convert pdf to svg?
    • Use Inkscape which allows you to also remove unwanted parts of the pdf.
  • Do not use screenshots!
    • Google Slides allows svg export.
    • PDF can be converted to svg and you can even cut parts.
    • HTML can be converted to svg.
  • The difference between vector (svg) and pixel (png) graphics should be known.
    • Attention: svg and pdf also support to include pixel graphics. There is no guarantee that a svg or pdf is a pure vector graphic. If you paste a pixel graphic (e.g. a screenshot) into Inkscape and save it as svg it does not magically become a vector graphic.

Spacing

  • Always start a new sentence on a new line, this keeps the diff readable.
  • Put an empty line before and after code blocks.

More Repositories

1

mlr

Machine Learning in R
R
1,643
star
2

mlr3

mlr3: Machine Learning in R - next generation
R
937
star
3

mlrMBO

Toolbox for Bayesian Optimization and Model-Based Optimization in R
R
187
star
4

mlr3pipelines

Dataflow Programming for Machine Learning in R
R
138
star
5

mlr3proba

Probabilistic Learning for mlr3
R
128
star
6

mlr3extralearners

Extra learners for use in mlr3.
R
90
star
7

mlr3learners

Recommended learners for mlr3
R
90
star
8

mlr-outreach

HTML
64
star
9

parallelMap

R package to interface some popular parallelization backends with a unified interface
R
57
star
10

mlr3tuning

Hyperparameter optimization package of the mlr3 ecosystem
R
54
star
11

mlr3verse

Meta-package for installing/updating mlr3* packages.
R
50
star
12

mlr3spatiotempcv

Spatiotemporal resampling methods for mlr3
TeX
48
star
13

mlr3viz

Visualizations for mlr3
R
42
star
14

mlr3spatial

Spatial objects within the mlr3 ecosystem
HTML
42
star
15

mlr3torch

Deep learning framework for the mlr3 ecosystem based on torch
R
38
star
16

mlrCPO

Composable Preprocessing Operators for MLR
R
37
star
17

mlr3keras

Deep learning for mlr3
R
36
star
18

mcboost

Multi-Calibration & Multi-Accuracy Boosting for R
R
30
star
19

paradox

ParamHelpers Next Generation
R
28
star
20

ParamHelpers

Helpers for parameters in black-box optimization, tuning and machine learning.
R
26
star
21

mlr3mbo

Flexible Bayesian Optimization in R
R
25
star
22

mlr3cluster

Cluster analysis for mlr3
R
21
star
23

mlr3fselect

Feature selection package of the mlr3 ecosystem.
R
21
star
24

mlr3gallery

Case studies using mlr3
HTML
21
star
25

mlr3db

Data Backends to let mlr3 work transparently with (remote) data bases
R
21
star
26

mlr3filters

Filter-based feature selection for mlr3
R
20
star
27

bbotk

Black-box optimization framework for R.
R
20
star
28

mlr3temporal

Forecasting for mlr3
HTML
20
star
29

mlr3-learndrake

Template for using mlr3 with drake
HTML
18
star
30

mlr3hyperband

Successive Halving and Hyperband in the mlr3 ecosystem
R
18
star
31

miesmuschel

Flexible Mixed Integer Evolutionary Strategies
R
15
star
32

user2020

Material for the useR2020 tutorial
14
star
33

mlr3fairness

mlr3 extension for Fairness in Machine Learning
HTML
14
star
34

mlr3tuningspaces

Collection of search spaces for hyperparameter optimization in the mlr3 ecosystem
R
13
star
35

mlr3measures

Performance measures used in mlr3
R
13
star
36

mlr3benchmark

Analysis and tools for benchmarking in mlr3 and beyond.
R
12
star
37

mlr3misc

Miscellaneous helper functions for mlr3
R
12
star
38

farff

a faster arff parser
R
11
star
39

mlr3cheatsheets

Cheat Sheets for mlr3 and Friends
HTML
11
star
40

mlr3website

The mlr3 quarto website and accomanying R package.
R
8
star
41

rush

Parallel and distributed computing in R.
R
8
star
42

mlr-extralearner

R
8
star
43

mlr3survival

Survival analysis for mlr3
R
7
star
44

mlr3automl

R
6
star
45

mlr3-targets

R
6
star
46

mlr3oml

Connect mlr3 with OpenML
R
6
star
47

mlr3summary

R
6
star
48

mlr3learners.template

Learner from package {<package>} for mlr3
R
5
star
49

mlr3batchmark

Connector between mlr3 and batchtools
R
5
star
50

mlr3docker

Docker Image for mlr3
Dockerfile
5
star
51

mlr3ordinal

Ordinal Regression for mlr3
R
5
star
52

mlr3fda

Functional Data Analysis for mlr3
R
4
star
53

mlr3multioutput

Multiple Targets for mlr3
R
4
star
54

styler.mlr

{styler} mlr style guide
R
4
star
55

mlr3forecast

Time series forecasting for mlr3
R
4
star
56

mlr-web

HTML
3
star
57

mlr3pkgdowntemplate

pkgdown template package for mlr* packages
SCSS
2
star
58

mlr3data

Data sets used in the book, gallery, or in examples of mlr3.
R
2
star
59

mlr3inferr

Statistical methods for inference on the generalization error
R
2
star
60

mlr3ensemble

mlr3 extension package for ensemble machine learning
R
1
star
61

mlr-org-website

HTML
1
star
62

mlrcranlog

mlr-org cranlogs
R
1
star