class_docstr: SVM trainer that takes care of training (using k-fold cross validation),
  and evaluating the SVMs
class_docstr_tok: ["SVM","trainer","that","takes","care","of","training","(","using","k-fold","cross","validation",")",",","and","evaluating","the","SVMs"]
docstr: Train SVMs on the given features and targets for all classes and all the
  costs values.
docstr_tok: ["Train","SVMs","on","the","given","features","and","targets","for","all","classes","and","all","the","costs","values","."]
code: def train(self, features, targets):
      """
      Train SVMs on the given features and targets for all classes and all the
      costs values.
      """
      logging.info("Training SVM")
      if self.normalize:
          # normalize the features: N x 9216 (example shape)
          features = self._normalize_features(features)
  
      # get the class lists to train: whether all or some
      self.cls_list = self._get_cls_list(targets)
      self.train_ap_matrix = np.zeros(
          (len(self.cls_list), len(self.costs_list))
      )
      threads = []
      for cls_idx in range(len(self.cls_list)):
          cls_num = self.cls_list[cls_idx]
          threads.append(
              threading.Thread(
                  target=self.train_cls,
                  args=(features, targets, cls_num),
              )
          )
      for t in threads:
          t.start()
      for t in threads:
          t.join()
  
imports: import logging
  import pickle
  import threading
  import numpy
  from iopath.common.file_io import g_pathmgr
  from sklearn.model_selection import cross_val_score
  from sklearn.svm import LinearSVC
  from vissl.utils.io import load_file, save_file
  from vissl.utils.svm_utils.evaluate import get_precision_recall
label_desc: Use image node_id 10 for calling the SVMTrainer obj's underlying member method code with example usage: obj.train(features, targets) without return types