Creates a graph of an ordinal regression pipeline for a regression or classification learner
pipeline_ordinal(learner)
learner |
---|
Graph
.
The resulting graph can used as GraphLearner
library(mlr3) library(mlr3pipelines) task = tsk("winerating") learner = lrn("regr.rpart") graph = ppl("ordinal", learner) glearner = GraphLearner$new(graph, task_type = "ordinal") resampling = rsmp("cv") # explicitly instantiate the resampling for this task for reproduciblity set.seed(123) resampling$instantiate(task) rr = resample(task, glearner, resampling) print(rr)#> <ResampleResult> of 10 iterations #> * Task: winerating #> * Learner: copy.update_target.nop.regr.rpart.ordinalregr #> * Warnings: 0 in 0 iterations #> * Errors: 0 in 0 iterations#> ordinal.ce #> 0.1517857