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
8
votes
1 answer

Convert predicted probabilities after downsampling to actual probabilities in classification (using mlr)

If I use undersampling in case of an unbalanced binary target variable to train a model, the prediction method calculates probabilities under the assumption of a balanced data set. How can I convert these probabilities to actual probabilities for…
tover
  • 535
  • 4
  • 11
6
votes
1 answer

R mlr package - is it possible to save all models from Parameter tuning?

I wanted to ask whether it is possible to save all models which were created during parameter tuning, e.g. with tuneParams function. I'd like to save models from every fold of cross validation for every hyperparameter set. I can see that there is…
Matek
  • 641
  • 5
  • 16
6
votes
2 answers

Tuning integer vector in mlr

I am creating custom learners, in particular I am trying to use the h2o machine learning algorithms within the mlr framework. The 'hidden' parameter of the h2o.deeplearning function, is an integer vector which I want to tune. I defined the 'hidden'…
ptr_
  • 61
  • 5
5
votes
1 answer

Xgboost for survival using mlr in R

I would like to use mlr to run xgboost on right-censored survival data in R. The xgboost code lists an objective function survival:cox which says: survival:cox: Cox regression for right censored survival time data (negative values are considered…
panda
  • 821
  • 1
  • 9
  • 20
5
votes
1 answer

How many iterations for model-based optimization (in mlrMBO) are necessary?

I would like to use model-based optimization within the mlr-Package in R (mlrMBO) to tune my hyperparameters. How many iterations are recommended here? I have read that the number of necessary iterations in MBO depends on the number of…
Ana
  • 115
  • 6
5
votes
1 answer

Using bit.names and bits.to.features arguments to makeFeatSelWrapper (mlr) to perform wrapper selection over groups of features

I would like to perform feature selection by a wrapper method on the iris data set using mlr package, however I would like to look only at groups of features associated with Petal and/or Sepal. So instead of looking at 4 features in different…
missuse
  • 19,056
  • 3
  • 25
  • 47
5
votes
0 answers

Tune glmnet hyperparameters and evaluate performance using nested cross-validation in mlr?

I'm trying to use the R package mlr to train a glmnet model on a binary classification problem with a large dataset (about 850000 rows and about 100 features) on very modest hardware (my laptop with 4GB RAM --- I don't have access to more CPU…
4
votes
0 answers

Getting the feature importance in a SVM

I did a multiclass (3) classification using a SVM with a linear kernel. For this task, I used the mlr package. The SVM is from the kernlab package. library(mlr) library(kernlab) print(filtered_task) Supervised task: dtm Type: classif Target:…
Banjo
  • 1,191
  • 1
  • 11
  • 28
4
votes
2 answers

Nested resampling + LASSO (regr.cvglment) using mlr

I am trying to conduct nested resampling with 10 CVs for the inner and 10 CVs for the outer loop using regr.cvglment. Mlr provides the code using a wrapper function (https://mlr-org.github.io/mlr/articles/tutorial/devel/nested_resampling.html) Now,…
Sarah
  • 137
  • 9
4
votes
0 answers

R - mlr: Is there a easy way to get the variable importance of tuned support vector machine models in nested resampling (spatial)?

I am trying to get the variable importance for all predictors (or variables, or features) of a tuned support vector machine (svm) model using e1071::svm through the mlr-package in R. But I am not sure, if I am doing the assessment right. Well, at…
raff-k
  • 41
  • 1
  • 2
4
votes
0 answers

mlr: Error in makeClassifTask: Assertion on 'data' failed: Columns must be named according to R's variable naming rules

I have an error library(mlr) library(dplyr) tree <- read.csv("file.csv", header = T, na.strings=c("", "NA")) tree$hipo = as.factor(tree$группы==1) # this variable has 3 levels i want to get 2 df = select(tree, - группы) trainTask <-…
Edward
  • 4,443
  • 16
  • 46
  • 81
4
votes
2 answers

List Learners in Mlr including Unistalled Ones

I want to get a list of all clustering algorithms integrated in the mlr package. I excpected this code to return them, but it excludes the uninstalled ones: library(mlr) listLearners("cluster") # default: create=F, check.packages=F Instead I get…
tover
  • 535
  • 4
  • 11
4
votes
1 answer

Error predict with mlr:

I tried to train a h2o model using the following code and make a prediction for new data, but it leads to an error. How can I avoid this error? library(mlr) a <- data.frame(y=factor(c(1,1,1,1,1,1,1,1,0,0,1,0)), …
tover
  • 535
  • 4
  • 11
4
votes
2 answers

R mlr - Wrapper feature selection + hyperparameter tuning without nested-nested cross validation?

In mlr, it is possible to do filter feature selection together with hyperparameter tuning using nested cross validation, e.g. with the following code. lrn = makeFilterWrapper(learner = "regr.kknn", fw.method = "chi.squared") ps =…
Matek
  • 641
  • 5
  • 16
4
votes
1 answer

mlr - Ensemble Models

The mlr package is great and idea of creating a ModelMultiplexer also helps. But the ModelMultiplexer "selects" 1 single model out of the models used. Is there any support or planned support for creating a Bagged or Boosted Ensemble of the…
myloginid
  • 1,463
  • 2
  • 22
  • 37
1
2 3
21 22