class_docstr: Base class for pairs learners.
  
  Attributes
  ----------
  threshold_ : `float`
    If the distance metric between two points is lower than this threshold,
    points will be classified as similar, otherwise they will be
    classified as dissimilar.
class_docstr_tok: ["Base","class","for","pairs","learners",".","Attributes","--","--","--","--","--","threshold_",":","`","float","`","If","the","distance","metric","between","two","points","is","lower","than","this","threshold",",","points","will","be","classified","as","similar",",","otherwise","they","will","be","classified","as","dissimilar","."]
docstr: Returns the decision function used to classify the pairs.
  
  Returns the opposite of the learned metric value between samples in every
  pair, to be consistent with scikit-learn conventions. Hence it should
  ideally be low for dissimilar samples and high for similar samples.
  This is the decision function that is used to classify pairs as similar
  (+1), or dissimilar (-1).
  
  Parameters
  ----------
  pairs : array-like, shape=(n_pairs, 2, n_features) or (n_pairs, 2)
    3D Array of pairs to predict, with each row corresponding to two
    points, or 2D array of indices of pairs if the metric learner uses a
    preprocessor.
  
  Returns
  -------
  y_predicted : `numpy.ndarray` of floats, shape=(n_constraints,)
    The predicted decision function value for each pair.
docstr_tok: ["Returns","the","decision","function","used","to","classify","the","pairs",".","Returns","the","opposite","of","the","learned","metric","value","between","samples","in","every","pair",",","to","be","consistent","with","scikit-learn","conventions",".","Hence","it","should","ideally","be","low","for","dissimilar","samples","and","high","for","similar","samples",".","This","is","the","decision","function","that","is","used","to","classify","pairs","as","similar","(","+1",")",",","or","dissimilar","(","-1",")",".","Parameters","--","--","--","--","--","pairs",":","array-like",",","shape=","(","n_pairs",",","2",",","n_features",")","or","(","n_pairs",",","2",")","3D","Array","of","pairs","to","predict",",","with","each","row","corresponding","to","two","points",",","or","2D","array","of","indices","of","pairs","if","the","metric","learner","uses","a","preprocessor",".","Returns","--","--","--","-","y_predicted",":","`","numpy.ndarray","`","of","floats",",","shape=","(","n_constraints",",",")","The","predicted","decision","function","value","for","each","pair","."]
code: def decision_function(self, pairs):
      """Returns the decision function used to classify the pairs.
  
      Returns the opposite of the learned metric value between samples in every
      pair, to be consistent with scikit-learn conventions. Hence it should
      ideally be low for dissimilar samples and high for similar samples.
      This is the decision function that is used to classify pairs as similar
      (+1), or dissimilar (-1).
  
      Parameters
      ----------
      pairs : array-like, shape=(n_pairs, 2, n_features) or (n_pairs, 2)
        3D Array of pairs to predict, with each row corresponding to two
        points, or 2D array of indices of pairs if the metric learner uses a
        preprocessor.
  
      Returns
      -------
      y_predicted : `numpy.ndarray` of floats, shape=(n_constraints,)
        The predicted decision function value for each pair.
      """
      check_is_fitted(self, "preprocessor_")
      pairs = check_input(
          pairs,
          type_of_inputs="tuples",
          preprocessor=self.preprocessor_,
          estimator=self,
          tuple_size=self._tuple_size,
      )
      return self.pair_score(pairs)
  
imports: from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.utils.extmath import stable_cumsum
  from sklearn.utils.validation import _is_arraylike, check_is_fitted
  from sklearn.metrics import roc_auc_score, roc_curve, precision_recall_curve
  import numpy
  from abc import ABCMeta, abstractmethod
  from ._util import ArrayIndexer, check_input, validate_vector
  import warnings
label_desc: Use image node_id 2 for calling the _PairsClassifierMixin obj's underlying member method code with example usage: obj.decision_function(pairs) and returns: self