pipeline_ordinal: Ordinal Regression Pipeline

View source: R/pipeline_ordinal.R

pipeline_ordinalR Documentation

Ordinal Regression Pipeline

Description

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

Usage

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)

# retrieve performance
rr$aggregate(msr("ordinal.ce"))

mlr-org/mlr3ordinal documentation built on Jan. 10, 2023, 10:04 a.m.