class_docstr: Base class for all metric-learners.
  
  Parameters
  ----------
  preprocessor : array-like, shape=(n_samples, n_features) or callable
    The preprocessor to call to get tuples from indices. If array-like,
    tuples will be gotten like this: X[indices].
class_docstr_tok: ["Base","class","for","all","metric-learners",".","Parameters","--","--","--","--","--","preprocessor",":","array-like",",","shape=","(","n_samples",",","n_features",")","or","callable","The","preprocessor","to","call","to","get","tuples","from","indices",".","If","array-like",",","tuples","will","be","gotten","like","this",":","X","[","indices","]","."]
docstr: .. versionadded:: 0.7.0 Compute the similarity score between pairs
  
  Returns the similarity score between pairs of points (the larger the score,
  the more similar the pair). For metric learners that learn a distance,
  the score is simply the opposite of the distance between pairs. All
  learners have access to this method.
  
  Parameters
  ----------
  pairs : array-like, shape=(n_pairs, 2, n_features) or (n_pairs, 2)
    3D Array of pairs to score, with each row corresponding to two points,
    for 2D array of indices of pairs if the metric learner uses a
    preprocessor.
  
  Returns
  -------
  scores : `numpy.ndarray` of shape=(n_pairs,)
    The score of every pair.
  
  See Also
  --------
  get_metric : a method that returns a function to compute the metric between
    two points. The difference with `pair_score` is that it works on two
    1D arrays and cannot use a preprocessor. Besides, the returned function
    is independent of the metric learner and hence is not modified if the
    metric learner is.
docstr_tok: ["..","versionadded",":",":","0.7.0","Compute","the","similarity","score","between","pairs","Returns","the","similarity","score","between","pairs","of","points","(","the","larger","the","score",",","the","more","similar","the","pair",")",".","For","metric","learners","that","learn","a","distance",",","the","score","is","simply","the","opposite","of","the","distance","between","pairs",".","All","learners","have","access","to","this","method",".","Parameters","--","--","--","--","--","pairs",":","array-like",",","shape=","(","n_pairs",",","2",",","n_features",")","or","(","n_pairs",",","2",")","3D","Array","of","pairs","to","score",",","with","each","row","corresponding","to","two","points",",","for","2D","array","of","indices","of","pairs","if","the","metric","learner","uses","a","preprocessor",".","Returns","--","--","--","-","scores",":","`","numpy.ndarray","`","of","shape=","(","n_pairs",",",")","The","score","of","every","pair",".","See","Also","--","--","--","--","get_metric",":","a","method","that","returns","a","function","to","compute","the","metric","between","two","points",".","The","difference","with","`","pair_score","`","is","that","it","works","on","two","1D","arrays","and","can","not","use","a","preprocessor",".","Besides",",","the","returned","function","is","independent","of","the","metric","learner","and","hence","is","not","modified","if","the","metric","learner","is","."]
code: def pair_score(self, pairs):
      """
      .. versionadded:: 0.7.0 Compute the similarity score between pairs
  
      Returns the similarity score between pairs of points (the larger the score,
      the more similar the pair). For metric learners that learn a distance,
      the score is simply the opposite of the distance between pairs. All
      learners have access to this method.
  
      Parameters
      ----------
      pairs : array-like, shape=(n_pairs, 2, n_features) or (n_pairs, 2)
        3D Array of pairs to score, with each row corresponding to two points,
        for 2D array of indices of pairs if the metric learner uses a
        preprocessor.
  
      Returns
      -------
      scores : `numpy.ndarray` of shape=(n_pairs,)
        The score of every pair.
  
      See Also
      --------
      get_metric : a method that returns a function to compute the metric between
        two points. The difference with `pair_score` is that it works on two
        1D arrays and cannot use a preprocessor. Besides, the returned function
        is independent of the metric learner and hence is not modified if the
        metric learner is.
      """
  
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 3 for calling the BaseMetricLearner obj's underlying member method code with example usage: obj.pair_score(pairs) without return types