Closed be-marc closed 3 years ago
Function to create a simple stacking pipeline like https://github.com/mlr-org/mlr/blob/main/man/makeStackedLearner.Rd.
library(mlr3verse) library(mlr3pipelines) base_learners = list( lrn("classif.rpart", predict_type = "prob"), lrn("classif.kknn", predict_type = "prob") ) super_learner = lrn("classif.log_reg") graph_stack = pipeline_stacking(base_learners, super_learner) graph_learner = as_learner(graph_stack) graph_learner$train(tsk("iris"))
Function to create a simple stacking pipeline like https://github.com/mlr-org/mlr/blob/main/man/makeStackedLearner.Rd.