class_docstr: One-vs-One (OvO) multiclass strategy.
  
  This strategy consists in fitting one binary classifier for each pair of classes. Because we
  are in a streaming context, the number of classes isn't known from the start, hence new
  classifiers are instantiated on the fly.
  
  The number of classifiers is `k * (k - 1) / 2`, where `k` is the number of classes. However,
  each call to `learn_one` only requires training `k - 1` models. Indeed, only the models that
  pertain to the given label have to be trained. Meanwhile, making a prediction requires going
  through each and every model.
  
  Parameters
  ----------
  classifier
      A binary classifier, although a multi-class classifier will work too.
  
  Attributes
  ----------
  classifiers : dict
      A mapping between pairs of classes and classifiers. The keys are tuples which contain a
      pair of classes. Each pair is sorted in lexicographical order.
  
  Examples
  --------
  
  >>> from river import datasets
  >>> from river import evaluate
  >>> from river import linear_model
  >>> from river import metrics
  >>> from river import multiclass
  >>> from river import preprocessing
  
  >>> dataset = datasets.ImageSegments()
  
  >>> scaler = preprocessing.StandardScaler()
  >>> ovo = multiclass.OneVsOneClassifier(linear_model.LogisticRegression())
  >>> model = scaler | ovo
  
  >>> metric = metrics.MacroF1()
  
  >>> evaluate.progressive_val_score(dataset, model, metric)
  MacroF1: 80.76%
class_docstr_tok: ["One-vs-One","(","OvO",")","multiclass","strategy",".","This","strategy","consists","in","fitting","one","binary","classifier","for","each","pair","of","classes",".","Because","we","are","in","a","streaming","context",",","the","number","of","classes","is","n't","known","from","the","start",",","hence","new","classifiers","are","instantiated","on","the","fly",".","The","number","of","classifiers","is","`","k","*","(","k","-","1",")","\/","2","`",",","where","`","k","`","is","the","number","of","classes",".","However",",","each","call","to","`","learn_one","`","only","requires","training","`","k","-","1","`","models",".","Indeed",",","only","the","models","that","pertain","to","the","given","label","have","to","be","trained",".","Meanwhile",",","making","a","prediction","requires","going","through","each","and","every","model",".","Parameters","--","--","--","--","--","classifier","A","binary","classifier",",","although","a","multi-class","classifier","will","work","too",".","Attributes","--","--","--","--","--","classifiers",":","dict","A","mapping","between","pairs","of","classes","and","classifiers",".","The","keys","are","tuples","which","contain","a","pair","of","classes",".","Each","pair","is","sorted","in","lexicographical","order",".","Examples","--","--","--","--",">",">",">","from","river","import","datasets",">",">",">","from","river","import","evaluate",">",">",">","from","river","import","linear_model",">",">",">","from","river","import","metrics",">",">",">","from","river","import","multiclass",">",">",">","from","river","import","preprocessing",">",">",">","dataset","=","datasets.ImageSegments","(",")",">",">",">","scaler","=","preprocessing.StandardScaler","(",")",">",">",">","ovo","=","multiclass.OneVsOneClassifier","(","linear_model.LogisticRegression","(",")",")",">",">",">","model","=","scaler","|","ovo",">",">",">","metric","=","metrics.MacroF1","(",")",">",">",">","evaluate.progressive_val_score","(","dataset",",","model",",","metric",")","MacroF1",":","80.76","%"]
code: def _wrapped_model(self):
      return self.classifier
  
file_path: river/river/multiclass/ovo.py
imports: from __future__ import annotations
  import collections
  import copy
  import functools
  from river import base, linear_model
label_desc: Use image node_id 2 for calling the OneVsOneClassifier obj's underlying member method code with example usage: obj._wrapped_model() and returns: self