class_docstr: Mixin class for all classifiers in scikit-learn.
class_docstr_tok: ["Mixin","class","for","all","classifiers","in","scikit-learn","."]
docstr: Returns the mean accuracy on the given test data and labels.
  
  In multi-label classification, this is the subset accuracy
  which is a harsh metric since you require for each sample that
  each label set be correctly predicted.
  
  Parameters
  ----------
  X : array-like, shape = (n_samples, n_features)
      Test samples.
  
  y : array-like, shape = (n_samples) or (n_samples, n_outputs)
      True labels for X.
  
  sample_weight : array-like, shape = [n_samples], optional
      Sample weights.
  
  Returns
  -------
  score : float
      Mean accuracy of self.predict(X) wrt. y.
docstr_tok: ["Returns","the","mean","accuracy","on","the","given","test","data","and","labels",".","In","multi-label","classification",",","this","is","the","subset","accuracy","which","is","a","harsh","metric","since","you","require","for","each","sample","that","each","label","set","be","correctly","predicted",".","Parameters","--","--","--","--","--","X",":","array-like",",","shape","=","(","n_samples",",","n_features",")","Test","samples",".","y",":","array-like",",","shape","=","(","n_samples",")","or","(","n_samples",",","n_outputs",")","True","labels","for","X.","sample_weight",":","array-like",",","shape","=","[","n_samples","]",",","optional","Sample","weights",".","Returns","--","--","--","-","score",":","float","Mean","accuracy","of","self.predict","(","X",")","wrt",".","y","."]
code: def score(self, X, y, sample_weight=None):
      """Returns the mean accuracy on the given test data and labels.
  
      In multi-label classification, this is the subset accuracy
      which is a harsh metric since you require for each sample that
      each label set be correctly predicted.
  
      Parameters
      ----------
      X : array-like, shape = (n_samples, n_features)
          Test samples.
  
      y : array-like, shape = (n_samples) or (n_samples, n_outputs)
          True labels for X.
  
      sample_weight : array-like, shape = [n_samples], optional
          Sample weights.
  
      Returns
      -------
      score : float
          Mean accuracy of self.predict(X) wrt. y.
  
      """
      from .metrics import accuracy_score
  
      return accuracy_score(
          y, self.predict(X), sample_weight=sample_weight
      )
  
imports: import copy
  import warnings
  import numpy
  from scipy import sparse
  from .externals import six
  from .utils.fixes import signature
  from .utils.deprecation import deprecated
  from .exceptions import ChangedBehaviorWarning
  from .None import __version__
label_desc: Use image node_id 1 for calling the ClassifierMixin obj's underlying member method code with example usage: obj.score(X, y, sample_weight) and returns: accuracy_score