class_docstr: Base class for estimators that use libsvm as backing library.
  
  This implements support vector machine classification and regression.
  
  Parameter documentation is in the derived `SVC` class.
class_docstr_tok: ["Base","class","for","estimators","that","use","libsvm","as","backing","library",".","This","implements","support","vector","machine","classification","and","regression",".","Parameter","documentation","is","in","the","derived","`","SVC","`","class","."]
code: def _sparse_decision_function(self, X):
      X.data = np.asarray(X.data, dtype=np.float64, order="C")
  
      kernel = self.kernel
      if hasattr(kernel, "__call__"):
          kernel = "precomputed"
  
      kernel_type = self._sparse_kernels.index(kernel)
  
      return libsvm_sparse.libsvm_sparse_decision_function(
          X.data,
          X.indices,
          X.indptr,
          self.support_vectors_.data,
          self.support_vectors_.indices,
          self.support_vectors_.indptr,
          self._dual_coef_.data,
          self._intercept_,
          LIBSVM_IMPL.index(self._impl),
          kernel_type,
          self.degree,
          self._gamma,
          self.coef0,
          self.tol,
          self.C,
          # TODO(1.4): Replace "_class_weight" with "class_weight_"
          getattr(self, "_class_weight", np.empty(0)),
          self.nu,
          self.epsilon,
          self.shrinking,
          self.probability,
          self._n_support,
          self._probA,
          self._probB,
      )
  
imports: import warnings
  from abc import ABCMeta, abstractmethod
  from numbers import Integral, Real
  import numpy
  import scipy.sparse
  from ..base import BaseEstimator, ClassifierMixin, _fit_context
  from ..exceptions import ConvergenceWarning, NotFittedError
  from ..preprocessing import LabelEncoder
  from ..utils import check_array, check_random_state, column_or_1d, compute_class_weight
  from ..utils._param_validation import Interval, StrOptions
  from ..utils.extmath import safe_sparse_dot
  from ..utils.metaestimators import available_if
  from ..utils.multiclass import _ovr_decision_function, check_classification_targets
  from ..utils.validation import _check_large_sparse, _check_sample_weight, _num_samples, check_consistent_length, check_is_fitted
  from .None import _liblinear
  from .None import _libsvm
  from .None import _libsvm_sparse
label_desc: Use image node_id 14 for calling the BaseLibSVM obj's underlying member method code with example usage: obj._sparse_decision_function(X) and returns: libsvm_sparse