Creates a graph of an ordinal regression pipeline for a regression or classification learner

pipeline_ordinal(learner)

Arguments

learner

:: mlr3::LearnerClassif or mlr3::LearnerRegr.

Value

Graph. The resulting graph can used as GraphLearner

Examples

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
# retrieve performance rr$aggregate(msr("ordinal.ce"))
#> ordinal.ce #> 0.1517857