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 proportional to the signed
  distance of that sample to the hyperplane.
  
  Parameters
  ----------
  X : array-like or 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","proportional","to","the","signed","distance","of","that","sample","to","the","hyperplane",".","Parameters","--","--","--","--","--","X",":","array-like","or","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 proportional to the signed
      distance of that sample to the hyperplane.
  
      Parameters
      ----------
      X : array-like or 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.
      """
      check_is_fitted(self)
  
      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 = mt.dot(X, self.coef_.T) + self.intercept_
      return scores
  
imports: import numbers
  from abc import ABCMeta, abstractmethod
  from numpy.linalg import LinAlgError
  from sklearn.utils.validation import check_is_fitted, _deprecate_positional_args
  from sklearn.base import MultiOutputMixin
  from ...None import execute
  from ...None import tensor
  from ...tensor.datasource import tensor
  from ..base import BaseEstimator, RegressorMixin, ClassifierMixin
  from ..preprocessing import normalize
  from ..utils.validation import _check_sample_weight, check_array, FLOAT_DTYPES
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: scores