class_docstr: Mixin for linear classifiers.
  
  Handles prediction for sparse and dense X.
class_docstr_tok: ["Mixin","for","linear","classifiers",".","Handles","prediction","for","sparse","and","dense","X","."]
docstr: Predict confidence scores for samples.
  
  The confidence score for a sample is the signed distance of that
  sample to the hyperplane.
  
  Parameters
  ----------
  X : {array-like, sparse matrix}, shape = (n_samples, n_features)
      Samples.
  
  Returns
  -------
  array, shape=(n_samples,) if n_classes == 2 else (n_samples, n_classes)
      Confidence scores per (sample, class) combination. In the binary
      case, confidence score for self.classes_[1] where >0 means this
      class would be predicted.
docstr_tok: ["Predict","confidence","scores","for","samples",".","The","confidence","score","for","a","sample","is","the","signed","distance","of","that","sample","to","the","hyperplane",".","Parameters","--","--","--","--","--","X",":","{","array-like",",","sparse","matrix","}",",","shape","=","(","n_samples",",","n_features",")","Samples",".","Returns","--","--","--","-","array",",","shape=","(","n_samples",",",")","if","n_classes","==","2","else","(","n_samples",",","n_classes",")","Confidence","scores","per","(","sample",",","class",")","combination",".","In","the","binary","case",",","confidence","score","for","self.classes_","[","1","]","where",">","0","means","this","class","would","be","predicted","."]
code: def decision_function(self, X):
      """Predict confidence scores for samples.
  
      The confidence score for a sample is the signed distance of that
      sample to the hyperplane.
  
      Parameters
      ----------
      X : {array-like, sparse matrix}, shape = (n_samples, n_features)
          Samples.
  
      Returns
      -------
      array, shape=(n_samples,) if n_classes == 2 else (n_samples, n_classes)
          Confidence scores per (sample, class) combination. In the binary
          case, confidence score for self.classes_[1] where >0 means this
          class would be predicted.
      """
      if not hasattr(self, "coef_") or self.coef_ is None:
          raise NotFittedError(
              "This %(name)s instance is not fitted "
              "yet" % {"name": type(self).__name__}
          )
  
      X = check_array(X, accept_sparse="csr")
  
      n_features = self.coef_.shape[1]
      if X.shape[1] != n_features:
          raise ValueError(
              "X has %d features per sample; expecting %d"
              % (X.shape[1], n_features)
          )
  
      scores = (
          safe_sparse_dot(X, self.coef_.T, dense_output=True)
          + self.intercept_
      )
      return scores.ravel() if scores.shape[1] == 1 else scores
  
imports: from __future__ import division
  from abc import ABCMeta, abstractmethod
  import numbers
  import warnings
  import numpy
  import scipy.sparse
  from scipy import linalg
  from scipy import sparse
  from ..externals import six
  from ..externals.joblib import Parallel, delayed
  from ..base import BaseEstimator, ClassifierMixin, RegressorMixin
  from ..utils import check_array, check_X_y, deprecated, as_float_array
  from ..utils.validation import FLOAT_DTYPES
  from ..utils import check_random_state
  from ..utils.extmath import safe_sparse_dot
  from ..utils.sparsefuncs import mean_variance_axis, inplace_column_scale
  from ..utils.fixes import sparse_lsqr
  from ..utils.seq_dataset import ArrayDataset, CSRDataset
  from ..utils.validation import check_is_fitted
  from ..exceptions import NotFittedError
  from ..preprocessing.data import normalize
label_desc: Use image node_id 1 for calling the LinearClassifierMixin obj's underlying member method code with example usage: obj.decision_function(X) and returns: unknown