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

Error on tuning parameters using classif.svm in mlr3

I'm using the mlr3 to build a machine learning workflow using SVM classfier. When I try to tune the parameter library(mlr3) library(mlr3learners) library(paradox) library(mlr3tuning) task = tsk("pima") learner =…
Jiahao-AI
  • 39
  • 4
1
vote
1 answer

Why during model training chosen is different hyperparameter than that coming from resampling?

During resampling, the max_depth parameter with values of 5 and 9 is tested. However, while training, a completely different value of 10 is used. I expected that during training the parameter returning the smallest RMSE will be set. In this case, a…
nukubiho
  • 313
  • 1
  • 8
1
vote
1 answer

"cannot add bindings to a locked environment" when creating AutoTuner in mlr3

i have error message when I run code from mlr Manual. library(mlr3) task = mlr_tasks$get("iris") learner = mlr_learners$get("classif.rpart") resampling = mlr_resamplings$get("holdout") measures = mlr_measures$mget("classif.ce") param_set =…
0
votes
0 answers

Confusion with classbalancing pipeline in 'mlr3pipelines' when using resample

I am very confused about how the 'classbalancing' pipeline operates, specifically during resampling with 'resample'. I am performing a binary logistic regression using a large dataset, and would like to downsample my major class while performing…
0
votes
1 answer

Viewing data properties after proceeding through 'classbalancing' pipeline mlr3

I am trying to find a way of ensure my mlr3pipeline is working as expected. I have a classbalancing pipeline and am trying to view properties of the data being given to my model, and split for testing/training. I suspect a much larger portion than…
0
votes
2 answers

Why are tuned minsplit & minbucket from rpart decimal numbers?

I estimate a model using a classif.rpart learner. The estimation is embedded in a nested resampling. When I look at the inner tuning results using mlr3tuning::extract_inner_tuning_results(bmr), the values for minbucket and minsplit are decimal…
Theresa
  • 3
  • 2
0
votes
1 answer

MLR3 : Extract predictions in a data table

I have a simple question concerning the extraction of predictions when we do a nested resampling. I don't know how to extract in data table the results from the validation and test sets : Here is my code : set.seed(1234) rr_xgboost =…
NDe
  • 71
  • 6
0
votes
0 answers

MLR3 : Prediction of new datas

I just trained and performed prediction with a learner. He's good at predicting, so I wanted to keep and save it to use on new datas : best_ranger<-bmr_ranger$score(msr("classif.bacc"))[learner_id == 'classif.ranger.tuned', ][classif.bacc ==…
NDe
  • 71
  • 6
0
votes
1 answer

'classif.ranger' not found in DictionaryLearner

I am trying to implement the tuning space 'classif.ranger.rbv1' from mlr3tuningspaces However, I am getting an error for the learner that the 'classif.ranger' is not found in the DictionaryLearner I have tried two methods, shown below tuning_space…
0
votes
0 answers

MLR3 : Extract predictions on my train set

After building my at algorithm, I trained him on my train set and tried to make predictions on the test set. Unfortunately, it's very difficult for me to extract the predictions my model made on my train set... Here is the code I wrote to extract…
NDe
  • 71
  • 6
0
votes
1 answer

Xgboost modifies ground truth values?

I'm running xgboost model on multiple tasks and I saw after extraction of predictions on my validation and test, that my xgboost just modified some ground truth values : Here are the predictions extracted for my validation for example : And here…
NDe
  • 71
  • 6
0
votes
0 answers

Problem with relaxed LASSO using glmnet within mlr3: object 'cv' not found

I need to replicate some relaxed LASSO regression R code that currently uses the glmnet package directly. I want to transfer the code to the mlr3 framework so that the model can be compared with other machine learning methods. The tuning of the…
KxZzvv
  • 1
  • 2
0
votes
1 answer

Changing features in mlr3 task

Is it possible to change a feature in an mlr3 task object? I know that po("mutate") can be used to engineer new feature, but i don't know if there is a way to change an existing one. I tried to change the features in the task itself, but it doesn't…
Yodi
  • 1
0
votes
0 answers

Is rr and at results the same?

I'm studying some models of machine learning and currently optimizing the models : I have to compare these algos on my validation set to select the best one. I use two methods with mlr3 (the code here is an example) : 1) learner_svm =…
NDe
  • 71
  • 6
0
votes
0 answers

How to save mlr3 resample object results to disk

Has anyone an efficient way to serialize and save the R6 class objects produced by the resample() function in the mlr3 package? Using saveRDS() doesn't seem to work as it takes forever. Googling suggested that serialization of the R6 objects in the…
Yodi
  • 1