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
0
votes
0 answers

parameterization of a random forest learner in mlr3

I am struggling to train a random forest via the library ranger while using mlr3. I set 3 parameters but don´t know how to initialize the training. Can someone help me debug this code in…
0
votes
2 answers

How to access parameters fitted by benchmark?

This is a really basic question, but I haven't found the answer on other sites, so I am kind of forced to ask about it here. I fitted my "classif.ranger" learner usin benchmark(design,store_models) function form mlr3 library and I need to acces the…
0
votes
2 answers

Different runtime for svm and ranger using the same task

I've bench-marked the runtime of the two learners and also took two screenshots of the {htop} while {ranger} and {svm} was training to make my point more clearer. As stated in the title of this post, my question is the reason Why train/predict in…
Sheykhmousa
  • 139
  • 9
0
votes
2 answers

Error in makeClassifTask - columns to join must specify "on="

I am getting an error here for the makeClassifTask() from MLR package. task = makeClassifTask(data = data[,2:20441], target='Disease') Entering this I get this error. Provided data is not a pure data.frame but from class data.table, hence it will…
0
votes
1 answer

How to test our model in mlr3 with nested hyperparameter optimization

I have just started learning mlr3 and have read the mlr3 book (parameters optimization). In the book, they provided an example for the nested hyperparameters but I do not know how to provide the final prediction i.e. predict (model, test data). The…
khan1
  • 1
  • 3
0
votes
1 answer

Parallelization on resampling within a stacked learner (ensemble/stack of classification learners) doesn't work

The below code works fine, however, I am interested to run it in parallel. I have tried different plans within future and future.apply but couldn't managed. Any help appreciated. I am running on windows OS, 8…
Sheykhmousa
  • 139
  • 9
0
votes
1 answer

Cant calculate interactions using flashlight package with iris data in R?

So Im trying to use the flashlight package with the iris data. One of the functions flashlight provides is to calculate the interactions between variables called light_interaction. I can get light_interaction to work if I use an lm model but I can…
Electrino
  • 2,636
  • 3
  • 18
  • 40
0
votes
2 answers

mlr3 - Apply pre-processing to new data

Using lmr3verse package here. Let's say I applied the following pre-processing to the training set used to train Learner: preprocess <- po("scale", param_vals = list(center = TRUE, scale = TRUE)) %>>% po("encode",param_vals =…
Nip
  • 387
  • 4
  • 11
0
votes
1 answer

mlr3: How to filter with mlr on training data set and apply results to model training?

When creating a filter in mlr3 how do you base the filter on only the training data? Once the filter is created how do you apply the filter to the modeling process and subset the training data to only include filter values above a certain…
rwdvc
  • 455
  • 5
  • 13
0
votes
1 answer

mlr3 distrcompose cdf: subscript out of bounds

R version used: 3.6.3, mlr3 version: 0.4.0-9000, mlr3proba version: 0.1.6.9000, mlr3pipelines version: 0.1.2 and xgboost version: 0.90.0.2 (as stated on Rstudio package manager) I have deployed the following graph pipeline: imputePipe =…
EvangelosK
  • 17
  • 4
0
votes
1 answer

mlr3proba surv.xgboost is not producing distr output + documentation link unstable

R version used: 3.6.3, mlr3 version: 0.4.0-9000, mlr3proba version: 0.1.6.9000 and xgboost version: 0.90.0.2 (as stated on Rstudio package manager) Unfortunately, when applying surv.xgboost for training and prediction, no distr output is produced…
EvangelosK
  • 17
  • 4
0
votes
2 answers

Reorder mlr3's trained model importance values to match that of task in R?

I was wonder how I could reorder the importance of features produced from a trained model from 'mlr3' to match the order of the feature names from task$feature_names? For example, if I create a task and model from mlr3 like so: #Get data aq <-…
Electrino
  • 2,636
  • 3
  • 18
  • 40
0
votes
0 answers

Is it possible, in mlr3, to predict new data without retraining the model?

An example with iris. We have some data, called tr. df = iris set.seed(1) sp = sample(nrow(iris), 0.7*nrow(iris)) tr = df[sp,] newdata = df[-sp,] We build a model in mlr3 with the data we have: tsk = TaskClassif$new(id="A", backend=tr,…
ocap
  • 26
  • 4
0
votes
1 answer

How to decode JSON data with mlr3 package in the prediction phase?

I have developed a graphlearner with the mlr3 package and I would like to publish it in a Rplumber service. However, when I receive the data to make predictions (data in JSON format), the graphlearner has trouble recognizing the data because the…
ZchGarinch
  • 295
  • 3
  • 13
0
votes
1 answer

SVM has not been trained using `probability = TRUE`, probabilities not available for predictions

I met problems when trying to output prediction probabilities of SVM using mlr3. library(mlr3) task = mlr_tasks$get("iris") svm_learner = mlr_learners$get("classif.svm") train_set = sample(task$nrow, 0.8 * task$nrow) test_set =…
Jiahao-AI
  • 39
  • 4
1 2 3
17
18