Questions tagged [mlr3]

mlr3 is the next generation of the mlr package for machine learning in R.

mlr3 is a redesigned version of the mlr package for machine learning in R, embracing R6 and data.table for cleaner code and more efficient operations. It provides a common interface to many learners that are implemented in R and many additional things, such as hyperparameter tuning and machine learning pipelines, on top. More information at https://mlr3.mlr-org.com/

mlr3 is a collection of packages with minimal dependencies between them to make installation easier. The mlr3 ecosystem comprises

  • the core package mlr3 and mlr3misc for miscellaneous additional functionality
  • mlr3featsel for feature selection
  • mlr3pipelines for machine learning pipelines
  • mlr3tuning for hyperparameter tuning
  • mlr3learners and mlr3extralearners for additional learner interfaces
  • mlr3ordinal for ordinal regression
  • mlr3survival for survival analysis
  • mlr3cluster for cluster analysis
  • mlr3forecasting for forecasting
  • mlr3fda for functional data analysis
  • mlr3spatiotemporal for spatial and temporal analytics
  • mlr3keras for deep learning with Keras
  • mlr3viz for visualizations
258 questions
1
vote
1 answer

Difference between graph and graph learner

I try to understand the difference between a graph and a graph learner. I can $train and $predict with a graph. But I need the "wrapper" in order to use row selection and scores (see code below). Is there something that can be done with a graph that…
ds_col
  • 129
  • 10
1
vote
1 answer

mlr3 confidence interval for AUC and cvAUC

I would like to calculate the confidence interval for area under the curve (AUC) and cross-validated (cv) AUC using mlr3 I learned that for a regression task this could be done with predict_type = "se" I wonder how this could be done for AUC/cvAUC…
ava
  • 840
  • 5
  • 19
1
vote
0 answers

Benchmarking with mlr3

I am not able to understand the behavior of mlr3 benchmarking. I developed 6 models and I used nested CV for each of them tuning hyperparameters (e.g. 2 hyperparameter for the rpart learner). On my desktops, each model takes about 10 minutes. I then…
RAN
  • 85
  • 8
1
vote
1 answer

AUC filter in ml3filters

I try to understand more about the AUC filter of mlr3filters. I use a classification task (task) and the following code: filter = flt("auc") filter$calculate(task) result<-as.data.table(filter) From the documentation in mlr3measures::auc(), I…
ds_col
  • 129
  • 10
1
vote
1 answer

Repeated cv in a mrl3 ensemble model

I have a beautiful mlr3 ensemble model (combined glmnet and glm) for binary prediction, see details here library("mlr3verse") library("dplyr") # get example data data(PimaIndiansDiabetes, package="mlbench") data <- PimaIndiansDiabetes # add an…
ava
  • 840
  • 5
  • 19
1
vote
1 answer

Filtering in mlr3filters - where can I find details about the methods?

I try to find details about the filtering methods that are mentioned here: https://mlr3book.mlr-org.com/list-filters.html#list-filters https://mlr3filters.mlr-org.com/ Unfortunately, I could not find more detailed information, e.g. how is…
ds_col
  • 129
  • 10
1
vote
2 answers

mlr3 resampling extension packages for financial time series

I could not find an extension package that allows for resampling methods that are suitable for financial market/time series data (e.g. training the model on a "rolling window" or "growing window" and testing on the data points immediately after the…
ds_col
  • 129
  • 10
1
vote
1 answer

How to interpret the aggregated performance result of nested resampling in mlr3?

Recently I am learning about the nested resampling in mlr3 package. According to the mlr3 book, the target of nested resampling is getting an unbiased performance estimates for learners. I run a test as follow: # loading…
Kim.L
  • 121
  • 10
1
vote
2 answers

How to get a reproducible result when using parallelization to do resampling with mlr3

Recently I was learning about using mlr3 package with parallelization. As the introduction from mlr3 book (https://mlr3book.mlr-org.com/technical.html) and tutorial(https://www.youtube.com/watch?v=T43hO2o_nZw&t=1s), mlr3 uses the future backends for…
Kim.L
  • 121
  • 10
1
vote
0 answers

Bug in ranger learner with predict.all = TRUE

I would like to have all the predictions of a random forest from the package {ranger} stored in an ml3 Prediction Object, and then use the predictions of the individual trees as features for another learner. The following code then follows to the…
1
vote
1 answer

adding classif.imbalanced.rfsrc in mlr3

First of all, many thanks to the guys @mlr3! The package randomForestSRC in R has a new function called imbalanced.rfsrc to help deal with class imbalance in classification. Will this learner be accessible in mlr3? imbalanced.rfsrc seems to work…
Kenzo
  • 71
  • 1
1
vote
0 answers

Regression chains where we have mixed types of output (continous, class, Survival)

I am new to MLR3 and I am loving it! Great job there! Lennart Schneider provides a very nice example of Regression chains https://mlr3gallery.mlr-org.com/posts/2020-04-18-regression-chains/ That got me thinking - how can I implement this using mixed…
Kenzo
  • 71
  • 1
1
vote
1 answer

How I include learners in mlr3

I am using rpart library in mlr3, but when I am changing it to other learners like nnet, it gives me error that not found in DictionaryLearner. In my code, only rpart is working and all other learners like nnet, svm gives error. I am using the…
Neha gupta
  • 43
  • 5
1
vote
1 answer

creating learner in mlr3: Error in sprintf(msg, ...) : too few arguments

I want to create a learner in mlr3, using the distRforest package. my code: library(mlr3extralearners) create_learner( pkg = "." , classname = 'distRforest', algorithm = 'regression tree', type = 'regr', …
carsten
  • 15
  • 4
1
vote
1 answer

How to rename mlr3 task feature values within pipeline

I have a mlr3 task df <- data.frame(v1 = c("a", "b", "a"), v2 = c(1, 2, 2), data = c(3.15, 4.11, 3.56)) library(mlr3) task <- TaskRegr$new("bmsp", df, target = "data") How can I rename the feature "v1" values "a" to values "c"…
Jānis
  • 57
  • 6