class_docstr: Classifier based on cosine similarity between vectorized sentences
  
  Parameters:
      save_path: path to save the model
      load_path: path to load the model
class_docstr_tok: ["Classifier","based","on","cosine","similarity","between","vectorized","sentences","Parameters",":","save_path",":","path","to","save","the","model","load_path",":","path","to","load","the","model"]
docstr: Train classifier
  
  Parameters:
      x_train_vects: vectorized question for train dataset
      y_train: answers for train dataset
  
  Returns:
      None
docstr_tok: ["Train","classifier","Parameters",":","x_train_vects",":","vectorized","question","for","train","dataset","y_train",":","answers","for","train","dataset","Returns",":","None"]
code: def fit(
      self,
      x_train_vects: Tuple[Union[csr_matrix, List]],
      y_train: Tuple[str],
  ) -> None:
      """Train classifier
  
      Parameters:
          x_train_vects: vectorized question for train dataset
          y_train: answers for train dataset
  
      Returns:
          None
      """
      if isinstance(x_train_vects, tuple):
          if len(x_train_vects) != 0:
              if isinstance(x_train_vects[0], csr_matrix):
                  self.x_train_features = vstack(list(x_train_vects))
              elif isinstance(x_train_vects[0], np.ndarray):
                  self.x_train_features = np.vstack(list(x_train_vects))
              else:
                  raise NotImplementedError(
                      "Not implemented this type of vectors"
                  )
          else:
              raise ValueError("Train vectors can't be empty")
      else:
          self.x_train_features = x_train_vects
  
      self.y_train = list(y_train)
  
file_path: DeepPavlov/deeppavlov/models/classifiers/cos_sim_classifier.py
imports: from logging import getLogger
  from typing import List, Tuple, Union
  import numpy
  from scipy.sparse import vstack, csr_matrix
  from scipy.sparse.linalg import norm
  from deeppavlov.core.common.file import load_pickle
  from deeppavlov.core.common.file import save_pickle
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.models.estimator import Estimator
  from deeppavlov.core.models.serializable import Serializable
label_desc: Use image node_id 3 for calling the CosineSimilarityClassifier obj's underlying member method code with example usage: obj.fit(x_train_vects, y_train) without return types