mlr3(Machine Learning in R,https://github.com/mlr-org/mlr3)
Part I: 基础
Part II:
On the most basic level, the unified interface provides functionality to train, test, and evaluate many machine learning algorithms. You can also take this a step further with hyperparameter optimization, computational pipelines, model interpretation, and much more. mlr3 has similar overall aims to caret and tidymodels for R, scikit-learn for Python, and MLJ for Julia. In general, mlr3 is designed to provide more flexibility than other ML frameworks while still offering easy ways to use advanced functionality. While tidymodels in particular makes it very easy to perform simple ML tasks, mlr3 is more geared towards advanced ML.
install.packages("mlr3verse")
mlr3 生态中,有许多包。
都可以通过 install.packages() 进行下载。
remotes::install_github("mlr-org/{pkg}")
基本结构和设计有一个整体概念
文章里有训练,已有答案:
https://mlr3book.mlr-org.com/chapters/appendices/solutions.html
规范
class(R6 类):首字母大写
函数:小写
函数使用:pkg::function
library(mlr3)
task = tsk("penguins")
split = partition(task)
learner = lrn("classif.rpart")
learner$train(task, row_ids = split$train)
learner$model