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
1
vote
0 answers

Error in makeRegrTask: Assertion on 'id' failed: Must be of type 'string', not 'tbl_df/tbl/data.frame'

I have this strange error popping up when defining my mlr Random Forest (regression) Task. I cannot find anything online about this type of error. The error is: era.af.Al_Task <- era.af.Al_Tib %>% makeRegrTask(data = era.af.Al_Tib, target =…
1
vote
0 answers

How to tune parameters using h2o DL with mlr?

I am trying to change some of the parameters for a h2o deep learner using mlr. Similar questions have been asked here and here. However, I'm still confused as to how to change some specific parameters. I have provided a simple example below to…
Electrino
  • 2,636
  • 3
  • 18
  • 40
1
vote
1 answer

Setting the parameters for SVM Classification in R

Description: For a data set, I would like to apply SVM by using radial basis function (RBF) kernel with Weston, Watkins native multi-class. The rbf kernel parameter sigma must be tuned and I want to use k-folds cross validation to do this. I…
adam
  • 43
  • 5
1
vote
0 answers

mlrCPO - Task conversion TOCPO

I would like to build a CPO for the mlr::makeClassificationViaRegression wrapper. The wrapper builds regression models that predict for the positive class whether a particular example belongs to it (1) or not (-1). It also calculates predicted…
user51462
  • 1,658
  • 2
  • 13
  • 41
1
vote
1 answer

mlr makeModelMultiplexerParamSet with named ParamSets

The docs for makeModelMultiplexerParamSet the the mlr R package state that named ParamSets can be provided to disambiguate which parameters go to which learner, but the docs don't include an example of how to do that. I've tried a few things (such…
sharchaea
  • 743
  • 1
  • 6
  • 16
1
vote
0 answers

How do I tune a posterior probability threshold value for a binary classifier using more than one performance measure with the mlr package in R?

The following link provided me with a greater understanding of incorporating ordinary cost in my binary classification model: https://mlr.mlr-org.com/articles/tutorial/cost_sensitive_classif.html With a standard classifier, the default threshold is…
Outlier
  • 417
  • 2
  • 10
1
vote
0 answers

friedmanTestBMR using one classifier with multitasks - mlr

I have run a benchmark experiment with several tasks, containing different subsets of the data, with one classifier (random forest from the package ranger). Now I would like to compare on significance between different models using the post hoc…
Edvin
  • 11
  • 2
1
vote
1 answer

How to view all k neighbors when performing knn with the mir package?

I'm using the mlr package for knn (both for classification and regression problems), e.g.: knnTask <- makeClassifTask(data = df_train, target = "CLASS") knn <- makeLearner("classif.knn", par.vals = list("k" = 4)) knnModel <- train(knn, knnTask…
Adam_Smith
  • 31
  • 3
1
vote
0 answers

Add stratification in surv.coxph for mlr library? (R)

I'm unable to add strata() anywhere in the formula when training a Cox regression using mlr's surv.coxph Here's a rough example using lung dataset from survival package. I've arbitrarily chosen sex variable as my stratification…
haosin
  • 11
  • 2
1
vote
1 answer

R, iml, mlr. Feature Importance always returns 1 for every feature

I'm doing something with the mlr framework that causes FeatureImp to return 1 for every feature and I can't put my finger on it. Here's an exemple: library(caret) #> Carregando pacotes exigidos: lattice #> Carregando pacotes exigidos:…
Alberson Miranda
  • 1,248
  • 7
  • 25
1
vote
0 answers

Error: $ operator is invalid for atomic vectors in using MLR to predict a SVM model

I encountered this error message while I used prediction after training. Anyone knows where I went wrong? # Create train and test tasks trainTask <- makeClassifTask(data = data.train, target = "SetAppt", positive = "1") testTask <-…
jw_code
  • 21
  • 2
1
vote
2 answers

How do the aggregation methods aggregate performance metrics in MLR?

In MLR R package, there are methods to aggregate the parameter tuning model performance metrics, like train.mean, train.sd, test.mean, test.sd. I'm wondering how the aggregation process was done. From my current knowledge, it seemed the aggregation…
Jiahao-AI
  • 39
  • 4
1
vote
1 answer

Is there any function to make complex learner in MLR

I'm currently learning the MLR package. MLR provide function to enhance the power of base learner. Like makePreprocWrapperCaret for data preprocessing, makeFilterWrapperfor feature selection. I'm wondering if there are any more flexible functions,…
Jiahao-AI
  • 39
  • 4
1
vote
1 answer

How to see intermediate results from tuning in mlr in parallel?

Is it possible to see results for tuning rounds when using mlr and parallelMap and parallelizing at the mlr.tuneParams level? When I tune in serial, I see the results (hyperparameters, measures) in the Console for each combination of hyperparameters…
PBB
  • 131
  • 1
  • 7
1
vote
1 answer

R-MLR : get tuned hyperparameters for a wrapped learner

I'm building an xgboost classification task in R using the mlr package : # define task Task <- mlr::makeClassifTask(id = "classif.xgboost", data = df, target = "response", …
Basilique
  • 150
  • 1
  • 11