DBDelve
Dive deep into your data. A fast, native, multi-engine database client written in Rust. Free and open source, no telemetry.
翻訳待ち
mlr3: Machine Learning in R - next generation
翻訳待ち
開発ツールR · TeXGitHub @mlr-org自分でインストール所有者未確認
Paste into Claude or ChatGPT for installation instructions suited to your environment.
Have you tried it? One tap is enough. No sign-in needed.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Package website: release | dev
Efficient, object-oriented programming on the building blocks of machine learning. Successor of mlr.
mlr3 is used
in the
demos
and
exercises.mlr3viz and animint2 for interactive
visualizations.Install the last release from CRAN:
install.packages("mlr3")
Install the development version from GitHub:
# install.packages("pak")
pak::pak("mlr-org/mlr3")
If you want to get started with mlr3, we recommend installing the
mlr3verse meta-package which installs
mlr3 and some of the most important extension packages:
install.packages("mlr3verse")
library(mlr3)
# create learning task
task_penguins = as_task_classif(species ~ ., data = palmerpenguins::penguins)
task_penguins
##
## ── <TaskClassif> (344x8) ─────────────────────────────────────────────
## • Target: species
## • Properties: multiclass
## • Features (7):
## • int (3): body_mass_g, flipper_length_mm, year
## • dbl (2): bill_depth_mm, bill_length_mm
## • fct (2): island, sex
## • Target classes: Adelie (44%), Gentoo (36%), Chinstrap (20%)
# load learner and set hyperparameter
learner = lrn("classif.rpart", cp = .01)
# train/test split
split = partition(task_penguins, ratio = 0.67)
# train the model
learner$train(task_penguins, split$train_set)
# predict data
prediction = learner$predict(task_penguins, split$test_set)
# calculate performance
prediction$confusion
## truth
## response Adelie Chinstrap Gentoo
## Adelie 146 5 0
## Chinstrap 6 63 1
## Gentoo 0 0 123
measure = msr("classif.acc")
prediction$score(measure)
## classif.acc
## 0.9651163
# 3-fold cross validation
resampling = rsmp("cv", folds = 3L)
# run experiments
rr = resample(task_penguins, learner, resampling)
# access results
rr$score(measure)[, .(task_id, learner_id, iteration, classif.acc)]
## task_id learner_id iteration classif.acc
## 1: palmerpenguins::penguins classif.rpart 1 0.8956522
## 2: palmerpenguins::penguins classif.rpart 2 0.9478261
## 3: palmerpenguins::penguins classif.rpart 3 0.9649123
rr$aggregate(measure)
## classif.acc
## 0.9361302
Consult the wiki for short descriptions and links to the respective repositories.
For beginners, we strongly recommend to install and load the mlr3verse package for a better user experience.
This is the beginning of the README. Read the rest at the original. Read the full README ↗