docstr: Set up the unit test by loading the dataset and training a model.
docstr_tok: ["Set","up","the","unit","test","by","loading","the","dataset","and","training","a","model","."]
code: def setUpClass(self):
      """
      Set up the unit test by loading the dataset and training a model.
      """
      if not _HAS_LIBSVM:
          # setUpClass is still called even if class is skipped.
          return
  
      # Generate some random data.
      # This unit test should not rely on scikit learn for test data.
      self.x, self.y = [], []
      random.seed(42)
      for _ in range(50):
          self.x.append([random.gauss(200, 30), random.gauss(-100, 22)])
          self.y.append(random.choice([1, 2]))
      self.y[0] = 1  # Make sure 1 is always the first label it sees
      self.y[1] = 2
      self.column_names = ["x1", "x2"]
      self.prob = svmutil.svm_problem(self.y, self.x)
  
      param = svmutil.svm_parameter()
      param.svm_type = svmutil.C_SVC
      param.kernel_type = svmutil.LINEAR
      param.eps = 1
      param.probability = 1
  
      self.libsvm_model = svmutil.svm_train(self.prob, param)
  
imports: import copy
  import random
  import tempfile
  import unittest
  import numpy
  import pandas
  import pytest
  from coremltools._deps import _HAS_LIBSVM, _HAS_SKLEARN
  from coremltools.models.utils import _is_macos, _macos_version, evaluate_classifier, evaluate_classifier_with_probabilities
label_desc: Use image node_id 1 for calling the CSVCLibSVMTest obj's underlying member method code with example usage: obj.setUpClass() without return types