pipeline_ovr

0th

Percentile

Create A Graph to Perform "One vs. Rest" classification.

Create a new Graph for a classification Task to perform "One vs. Rest" classification.

Usage
pipeline_ovr(graph)
Arguments
graph

Graph Graph being wrapped between PipeOpOVRSplit and PipeOpOVRUnite. The Graph should return NULL during training and a classification Prediction during prediction.

Value

Graph

Aliases
  • pipeline_ovr
Examples
# NOT RUN {
library("mlr3")

task = tsk("wine")

learner = lrn("classif.rpart")
learner$predict_type = "prob"

# Simple OVR
g1 = pipeline_ovr(learner)
g1$train(task)
g1$predict(task)

# Bagged Learners
gr = po("replicate", reps = 3) %>>%
  po("subsample") %>>%
  learner %>>%
  po("classifavg", collect_multiplicity = TRUE)
g2 = pipeline_ovr(gr)
g2$train(task)
g2$predict(task)

# Bagging outside OVR
g3 = po("replicate", reps = 3) %>>%
  pipeline_ovr(po("subsample") %>>% learner) %>>%
  po("classifavg", collect_multiplicity = TRUE)
g3$train(task)
g3$predict(task)
# }
Documentation reproduced from package mlr3pipelines, version 0.3.0, License: LGPL-3

Community examples

Looks like there are no examples yet.