class_docstr: One-vs-one multiclass strategy.
  
  This strategy consists in fitting one classifier per class pair.
  At prediction time, the class which received the most votes is selected.
  Since it requires to fit `n_classes * (n_classes - 1) / 2` classifiers,
  this method is usually slower than one-vs-the-rest, due to its
  O(n_classes^2) complexity. However, this method may be advantageous for
  algorithms such as kernel algorithms which don't scale well with
  `n_samples`. This is because each individual learning problem only involves
  a small subset of the data whereas, with one-vs-the-rest, the complete
  dataset is used `n_classes` times.
  
  Read more in the :ref:`User Guide <ovo_classification>`.
  
  Parameters
  ----------
  estimator : estimator object
      A regressor or a classifier that implements :term:`fit`.
      When a classifier is passed, :term:`decision_function` will be used
      in priority and it will fallback to :term:`predict_proba` if it is not
      available.
      When a regressor is passed, :term:`predict` is used.
  
  n_jobs : int, default=None
      The number of jobs to use for the computation: the `n_classes * (
      n_classes - 1) / 2` OVO problems are computed in parallel.
  
      ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
      ``-1`` means using all processors. See :term:`Glossary <n_jobs>`
      for more details.
  
  Attributes
  ----------
  estimators_ : list of ``n_classes * (n_classes - 1) / 2`` estimators
      Estimators used for predictions.
  
  classes_ : numpy array of shape [n_classes]
      Array containing labels.
  
  n_classes_ : int
      Number of classes.
  
  pairwise_indices_ : list, length = ``len(estimators_)``, or ``None``
      Indices of samples used when training the estimators.
      ``None`` when ``estimator``'s `pairwise` tag is False.
  
  n_features_in_ : int
      Number of features seen during :term:`fit`.
  
      .. versionadded:: 0.24
  
  feature_names_in_ : ndarray of shape (`n_features_in_`,)
      Names of features seen during :term:`fit`. Defined only when `X`
      has feature names that are all strings.
  
      .. versionadded:: 1.0
  
  See Also
  --------
  OneVsRestClassifier : One-vs-all multiclass strategy.
  OutputCodeClassifier : (Error-Correcting) Output-Code multiclass strategy.
  
  Examples
  --------
  >>> from sklearn.datasets import load_iris
  >>> from sklearn.model_selection import train_test_split
  >>> from sklearn.multiclass import OneVsOneClassifier
  >>> from sklearn.svm import LinearSVC
  >>> X, y = load_iris(return_X_y=True)
  >>> X_train, X_test, y_train, y_test = train_test_split(
  ...     X, y, test_size=0.33, shuffle=True, random_state=0)
  >>> clf = OneVsOneClassifier(
  ...     LinearSVC(dual="auto", random_state=0)).fit(X_train, y_train)
  >>> clf.predict(X_test[:10])
  array([2, 1, 0, 2, 0, 2, 0, 1, 1, 1])
class_docstr_tok: ["One-vs-one","multiclass","strategy",".","This","strategy","consists","in","fitting","one","classifier","per","class","pair",".","At","prediction","time",",","the","class","which","received","the","most","votes","is","selected",".","Since","it","requires","to","fit","`","n_classes","*","(","n_classes","-","1",")","\/","2","`","classifiers",",","this","method","is","usually","slower","than","one-vs-the-rest",",","due","to","its","O","(","n_classes^2",")","complexity",".","However",",","this","method","may","be","advantageous","for","algorithms","such","as","kernel","algorithms","which","do","n't","scale","well","with","`","n_samples","`",".","This","is","because","each","individual","learning","problem","only","involves","a","small","subset","of","the","data","whereas",",","with","one-vs-the-rest",",","the","complete","dataset","is","used","`","n_classes","`","times",".","Read","more","in","the",":","ref",":","`","User","Guide","<","ovo_classification",">","`",".","Parameters","--","--","--","--","--","estimator",":","estimator","object","A","regressor","or","a","classifier","that","implements",":","term",":","`","fit","`",".","When","a","classifier","is","passed",",",":","term",":","`","decision_function","`","will","be","used","in","priority","and","it","will","fallback","to",":","term",":","`","predict_proba","`","if","it","is","not","available",".","When","a","regressor","is","passed",",",":","term",":","`","predict","`","is","used",".","n_jobs",":","int",",","default=None","The","number","of","jobs","to","use","for","the","computation",":","the","`","n_classes","*","(","n_classes","-","1",")","\/","2","`","OVO","problems","are","computed","in","parallel",".","``","None","``","means","1","unless","in","a",":","obj",":","`","joblib.parallel_backend","`","context",".","``","-1","``","means","using","all","processors",".","See",":","term",":","`","Glossary","<","n_jobs",">","`","for","more","details",".","Attributes","--","--","--","--","--","estimators_",":","list","of","``","n_classes","*","(","n_classes","-","1",")","\/","2","``","estimators","Estimators","used","for","predictions",".","classes_",":","numpy","array","of","shape","[","n_classes","]","Array","containing","labels",".","n_classes_",":","int","Number","of","classes",".","pairwise_indices_",":","list",",","length","=","``","len","(","estimators_",")","``",",","or","``","None","``","Indices","of","samples","used","when","training","the","estimators",".","``","None","``","when","``","estimator","``","'s","`","pairwise","`","tag","is","False",".","n_features_in_",":","int","Number","of","features","seen","during",":","term",":","`","fit","`",".","..","versionadded",":",":","0.24","feature_names_in_",":","ndarray","of","shape","(","`","n_features_in_","`",",",")","Names","of","features","seen","during",":","term",":","`","fit","`",".","Defined","only","when","`","X","`","has","feature","names","that","are","all","strings",".","..","versionadded",":",":","1.0","See","Also","--","--","--","--","OneVsRestClassifier",":","One-vs-all","multiclass","strategy",".","OutputCodeClassifier",":","(","Error-Correcting",")","Output-Code","multiclass","strategy",".","Examples","--","--","--","--",">",">",">","from","sklearn.datasets","import","load_iris",">",">",">","from","sklearn.model_selection","import","train_test_split",">",">",">","from","sklearn.multiclass","import","OneVsOneClassifier",">",">",">","from","sklearn.svm","import","LinearSVC",">",">",">","X",",","y","=","load_iris","(","return_X_y=True",")",">",">",">","X_train",",","X_test",",","y_train",",","y_test","=","train_test_split","(","...","X",",","y",",","test_size=0.33",",","shuffle=True",",","random_state=0",")",">",">",">","clf","=","OneVsOneClassifier","(","...","LinearSVC","(","dual=","''","auto","''",",","random_state=0",")",")",".fit","(","X_train",",","y_train",")",">",">",">","clf.predict","(","X_test","[",":10","]",")","array","(","[","2",",","1",",","0",",","2",",","0",",","2",",","0",",","1",",","1",",","1","]",")"]
code: def __init__(self, estimator, *, n_jobs=None):
      self.estimator = estimator
      self.n_jobs = n_jobs
  
imports: import array
  import itertools
  import warnings
  from numbers import Integral, Real
  import numpy
  import scipy.sparse
  from .base import BaseEstimator, ClassifierMixin, MetaEstimatorMixin, MultiOutputMixin, _fit_context, clone, is_classifier, is_regressor
  from .metrics.pairwise import pairwise_distances_argmin
  from .preprocessing import LabelBinarizer
  from .utils import check_random_state
  from .utils._param_validation import HasMethods, Interval
  from .utils._tags import _safe_tags
  from .utils.metadata_routing import MetadataRouter, MethodMapping, _raise_for_params, process_routing
  from .utils.metaestimators import _safe_split, available_if
  from .utils.multiclass import _check_partial_fit_first_call, _ovr_decision_function, check_classification_targets
  from .utils.parallel import Parallel, delayed
  from .utils.validation import _check_method_params, _num_samples, check_is_fitted
label_desc: Use image node_id 1 to create a new OneVsOneClassifier object from inherited base classes: MetaEstimatorMixin, ClassifierMixin, BaseEstimator with example: obj = OneVsOneClassifier(estimator)