class_docstr: An adapter for using scikit-learn estimators.
  
  Notes
  -----
  The multi-label settings currently assumes that the underlying classifer returns a sparse
  matrix if trained on sparse data.
class_docstr_tok: ["An","adapter","for","using","scikit-learn","estimators",".","Notes","--","--","-","The","multi-label","settings","currently","assumes","that","the","underlying","classifer","returns","a","sparse","matrix","if","trained","on","sparse","data","."]
docstr: Trains the model using the given train set.
  
  Parameters
  ----------
  train_set : SklearnDataset
      The dataset used for training the model.
  weights : np.ndarray[np.float32] or None, default=None
      Sample weights or None.
  
  Returns
  -------
  clf : SklearnClassifier
      Returns the current classifier with a fitted model.
docstr_tok: ["Trains","the","model","using","the","given","train","set",".","Parameters","--","--","--","--","--","train_set",":","SklearnDataset","The","dataset","used","for","training","the","model",".","weights",":","np.ndarray","[","np.float32","]","or","None",",","default=None","Sample","weights","or","None",".","Returns","--","--","--","-","clf",":","SklearnClassifier","Returns","the","current","classifier","with","a","fitted","model","."]
code: def fit(self, train_set, weights=None):
      """Trains the model using the given train set.
  
      Parameters
      ----------
      train_set : SklearnDataset
          The dataset used for training the model.
      weights : np.ndarray[np.float32] or None, default=None
          Sample weights or None.
  
      Returns
      -------
      clf : SklearnClassifier
          Returns the current classifier with a fitted model.
      """
      check_training_data(train_set, None, weights=weights)
      if self.multi_label and weights is not None:
          raise ValueError(
              "Sample weights are not supported for multi-label SklearnClassifier."
          )
  
      y = train_set.y
      if self.multi_label and not is_multilabel(y):
          raise ValueError(
              "Invalid input: Given labeling must be recognized as "
              "multi-label according to sklearn.utils.multilabel.is_multilabel(y)"
          )
      elif not self.multi_label and is_multilabel(y):
          raise ValueError(
              "Invalid input: Given labeling is recognized as multi-label labeling "
              "but the classifier is set to single-label mode"
          )
  
      fit_kwargs = (
          dict()
          if self.multi_label
          else dict({"sample_weight": weights})
      )
      self.model.fit(train_set.x, y, **fit_kwargs)
      return self
  
imports: from abc import ABC, abstractmethod
  import numpy
  from sklearn.multiclass import OneVsRestClassifier
  from sklearn.preprocessing import normalize
  from sklearn.svm import LinearSVC
  from sklearn.utils.multiclass import is_multilabel
  from small_text.utils.classification import empty_result, prediction_result
  from small_text.utils.data import check_training_data
label_desc: Use image node_id 2 for calling the SklearnClassifier obj's underlying member method code with example usage: obj.fit(train_set, weights) and returns: self