class_docstr: Kernelized online algorithm for learning an ordinal regression model.
  
  Parameters
  ----------
  n_iter : int
      Number of iterations to run.
  
  shuffle : boolean
      Whether to shuffle data.
  
  random_state : RandomState or int
      The seed of the pseudo random number generator to use.
  
  kernel: "linear" | "poly" | "rbf" | "sigmoid" | "cosine" | "precomputed"
      Kernel.
      Default: "linear"
  
  degree : int, default=3
      Degree for poly kernels. Ignored by other kernels.
  
  gamma : float, optional
      Kernel coefficient for rbf and poly kernels. Default: 1/n_features.
      Ignored by other kernels.
  
  coef0 : float, optional
      Independent term in poly and sigmoid kernels.
      Ignored by other kernels.
  
  kernel_params : mapping of string to any, optional
      Parameters (keyword arguments) and values for kernel passed as
      callable object. Ignored by other kernels.
  
  Attributes
  ----------
  dual_coef_ : array, shape=[n_samples]
      Estimated weights.
  
  thresholds_ : array, shape=[n_classes]
      Estimated thresholds.
  
  References
  ----------
  Pranking with Ranking
  Koby Crammer, Yoram Singer
  NIPS 2001
docstr: Fit model according to X and y.
  
  Parameters
  ----------
  X : array-like, shape = [n_samples, n_features]
      Training vectors, where n_samples is the number of samples
      and n_features is the number of features.
  
  y : array-like, shape = [n_samples]
      Target values.
  
  Returns
  -------
  self : classifier
      Returns self.
docstr_tok: ["Fit","model","according","to","X","and","y.","Parameters","--","--","--","--","--","X",":","array-like",",","shape","=","[","n_samples",",","n_features","]","Training","vectors",",","where","n_samples","is","the","number","of","samples","and","n_features","is","the","number","of","features",".","y",":","array-like",",","shape","=","[","n_samples","]","Target","values",".","Returns","--","--","--","-","self",":","classifier","Returns","self","."]
code: def fit(self, X, y):
      """Fit model according to X and y.
  
      Parameters
      ----------
      X : array-like, shape = [n_samples, n_features]
          Training vectors, where n_samples is the number of samples
          and n_features is the number of features.
  
      y : array-like, shape = [n_samples]
          Target values.
  
      Returns
      -------
      self : classifier
          Returns self.
      """
      n_samples, n_features = X.shape
      rs = self._get_random_state()
  
      self._label_encoder = LabelEncoder()
      y = self._label_encoder.fit_transform(y).astype(np.int32)
      n_classes = len(self.classes_)
  
      K = self._get_kernel(X)
      self.X_train_ = X
  
      self.dual_coef_ = np.zeros(n_samples, dtype=np.float64)
      self.thresholds_ = np.zeros(n_classes, dtype=np.float64)
      self.thresholds_[-1] = np.inf
  
      _prank_fit_kernel(
          self.dual_coef_,
          self.thresholds_,
          K,
          y,
          n_classes,
          self.n_iter,
          rs,
          self.shuffle,
      )
  
      return self
  
imports: import numpy
  from sklearn.preprocessing import LabelEncoder
  from sklearn.utils.extmath import safe_sparse_dot
  from sklearn.metrics.pairwise import pairwise_kernels
  from .base import BaseEstimator
  from .dataset_fast import get_dataset
  from .prank_fast import _prank_fit
  from .prank_fast import _prank_fit_kernel
  from .prank_fast import _prank_predict
label_desc: Use image node_id 4 for calling the KernelPRank obj's underlying member method code with example usage: obj.fit(X, y) and returns: self