mlr3

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

好久不见. 提交于 2021-01-29 06:44:31
问题 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 cores. library(mlr3verse) library(future.apply) #> Warning: package 'future.apply' was built under R version 3.6.3 #> Loading required package: future #> Warning: package 'future' was built under R version 3.6.3 library(future) future::plan(multicore) tsk_clf = tsk("sonar") tsk_clf$col

mlr3 PipeOps: Create branches with different data transformations and benchmark different learners within and between branches

爷,独闯天下 提交于 2020-08-26 03:08:27
问题 I'd like use PipeOp s to train a learner on three alternative transformations of a dataset: No transformation. Class balancing- down. Class balancing- up. Then, I'd like to benchmark the three learned models. My idea was to set up the pipeline as follows: Make pipeline: Input -> Impute dataset (optional) -> Branch -> Split into the three branches described above -> Add the learner within each branch -> Unbranch. Train pipeline and hope (that's where I'm getting it wrong) that the will be a

How to access and compare LASSO model coefficients with MLR3 (glmnet learner)?

与世无争的帅哥 提交于 2020-06-29 03:53:32
问题 Goal Create a LASSO model using MLR3 Use nested CV with inner CV or bootstraps for hyperparameter (lambda) determination and outer CV for model performance evaluation (instead of doing just one test-train spit) and finding the standard deviation of the different LASSO regression coefficients amongst the different model instances. Do a prediction on a testing data set not available yet. Issues I am unsure whether the nested CV approach as described is implemented correctly in my code below. I

How use predict to new data?

筅森魡賤 提交于 2020-06-16 06:25:31
问题 I would like to make predictions using created model by mlr3 package for new data that are previously unknown. I trained model by using AutoTuner function. I read chapter "3.4.1.4 Predicting" of mlr3 book, but the solution is not useful for my example where I want to use completely new data. library("mlr3") library("paradox") library("mlr3learners") library("mlr3tuning") library("data.table") set.seed(1) x1 = 1:100 x2 = 2 * x1 y = x1^2 - x2 + rnorm(100) data = data.table( x1 = x1, x2 = x2, y

How use predict to new data?

房东的猫 提交于 2020-06-16 06:22:31
问题 I would like to make predictions using created model by mlr3 package for new data that are previously unknown. I trained model by using AutoTuner function. I read chapter "3.4.1.4 Predicting" of mlr3 book, but the solution is not useful for my example where I want to use completely new data. library("mlr3") library("paradox") library("mlr3learners") library("mlr3tuning") library("data.table") set.seed(1) x1 = 1:100 x2 = 2 * x1 y = x1^2 - x2 + rnorm(100) data = data.table( x1 = x1, x2 = x2, y