Questions tagged [mlr]

mlr is a machine learning package for R that provides an interface to many other packages.

mlr is an R package that provides a standardized API to many of R's machine learning packages. On top of that, it offers resampling, feature selection, automatic tuning, cost-sensitive learning and much more. Its website can be found at https://github.com/mlr-org/mlr/

328 questions
2
votes
0 answers

MLR not registering learner in RStudio job

I have an mlr pipeline that requires a custom learner I built. I defined all the required functions and after running them, I can use the learner. However, when I run the script as a separate job in the new RStudio version, mlr doesn't seem to be…
Felipe Gerard
  • 1,552
  • 13
  • 23
2
votes
1 answer

Order of preprocessing step in mlr package in R

Working with already implemented preprocessing Wrappers as well as own Wrappers in mlr, I am wondering in which order the preprocessing steps are computed for the following example? classif.lrn.net = makePreprocWrapperCaret(classif.lrn.net,…
funkfux
  • 283
  • 3
  • 14
2
votes
1 answer

Predicting counts using mlr

I am using the learner regr.gbm to predict counts. Outside of mlr, using the gbm package directly, I use distribution = "poisson" and predict.gbm, using type = "response", returns predictions on the original scale, however I note that when I do…
Robert Long
  • 5,722
  • 5
  • 29
  • 50
2
votes
1 answer

Recursive feature elimination with mlr

It is possible to conduct a recursive feature elimination feature (rfe) with mlr ? I know this is possible with caret here but even if there is some documentation about feature selection with mlr, I did not find an equivalent to rfe.
MassCorr
  • 349
  • 1
  • 8
2
votes
1 answer

Average Stacking in MLR over responses, when two base learners disagree

I was using the 'average' stacking method to stack two base learners in MLR. It looks something like this: stacked.lrns[[1]] = makeStackedLearner(base.lrns, method = 'average', …
Coco
  • 41
  • 3
2
votes
0 answers

Saving and Loading an mlr Model

I've been able to successfully generate a model to assist in my multilabel assignment using the mlr library using the following setup, scene.task = makeMultilabelTask(data = training.data, target = labels) lrn.br = makeLearner("classif.rpart",…
A. Werner
  • 21
  • 2
2
votes
1 answer

R: Plotting importance feature using FeatureImp$new

Here is the code library(mlr) library(xgboost) library(iml) data("iris") tsk = makeClassifTask(data = iris, target = "Species") lrn = makeLearner("classif.xgboost",predict.type = "prob") mod = mlr:::train(lrn, tsk) X = iris[which(names(iris) !=…
user19568
  • 21
  • 3
2
votes
1 answer

mlr: Tune model parameters with validation set

Just switched to mlr for my machine learning workflow. I am wondering if it is possible to tune hyperparameters using a separate validation set. From my minimum understanding, makeResampleDesc and makeResampleInstance accepts only resampling from…
Boxuan
  • 4,937
  • 6
  • 37
  • 73
2
votes
2 answers

mlr: why does reproducibility of hyperparameter tuning fail using parallelization?

I use code based on Quickstart example in mlr cheatsheet. I added parallelization and tried to tune parameters several times. Question: Why does reproducibility fail (why aren't the results identical) even if I set set.seed() every time before…
GegznaV
  • 4,938
  • 4
  • 23
  • 43
2
votes
1 answer

MLR and randomForestSRC: Incoherence between computers

Our team run the following code to create a random forest model and train it: # Define a cross validation strategy rdesc <- makeResampleDesc("CV", iters = cv_fold, predict = "both") # Define a (regression) task task_01 = makeRegrTask(data =…
Jan Janiszewski
  • 432
  • 3
  • 14
2
votes
0 answers

R-mlr: How to pass extra parameters to predict while using resampling?

Is there a way to pass parameters to the predict call when using resampling in mlr? E.g. predict.coxph has an extra parameter "reference", which i want to change when using resampling, but extra-parameters for resampling seem to be for the learner…
complexM
  • 337
  • 1
  • 2
  • 8
2
votes
0 answers

Survival Analysis with time-varying covariates in R with the mlr package

is it possible to implement time-varying covariates in survival analysis with the mlr package like the method described in https://cran.r-project.org/web/packages/survival/vignettes/timedep.pdf?
2
votes
1 answer

MLR - getBMRModels - How to access each model from the benchmark result

When running a Benchmark Experiment on multiple algorithms, with tuning wrappers etc. there will be multiple models returned for each algorithm. What is the canonical way, or an effective way, of extracting each individual tuned model (with the…
2
votes
1 answer

MLR: How can I wrap the selection of specified features around the learner?

I would like to compare simple logistic regressions models where each model considers a specified set of features only. I would like to perform comparisons of these regression models on resamples of the data. The R package mlr allows me to select…
Richi W
  • 3,534
  • 4
  • 20
  • 39
2
votes
1 answer

MLR - Benchmark Experiment using nested resampling. How to access the inner resampling tuning results?

I am using Benchmark Experiments on a task. I am using a nested re-sampling strategy (https://mlr-org.github.io/mlr-tutorial/devel/html/nested_resampling/index.html). I create a learner using an inner resampling strategy. For example here is a…