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

PipelineOrdinal(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 = PipelineOrdinal(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.convertordinaltask.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