class_docstr: Unit test class for testing scikit-learn converter.
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.
      """
      from sklearn.datasets import load_boston
  
      scikit_data = load_boston()
      # axis parameter deprecated in SimpleImputer >= 0.22. which now imputes
      # only along columns as desired here.
      if _SKLEARN_VERSION >= StrictVersion("0.22"):
          scikit_model = Imputer(strategy="most_frequent")
      else:
          scikit_model = Imputer(strategy="most_frequent", axis=0)
      scikit_data["data"][1, 8] = np.NaN
  
      input_data = scikit_data["data"][:, 8].reshape(-1, 1)
      scikit_model.fit(input_data, scikit_data["target"])
  
      # Save the data and the model
      self.scikit_data = scikit_data
      self.scikit_model = scikit_model
  
file_path: coremltools/coremltools/test/sklearn_tests/test_categorical_imputer.py
imports: import unittest
  from distutils.version import StrictVersion
  import numpy
  from coremltools._deps import _HAS_SKLEARN, _SKLEARN_VERSION
label_desc: Use image node_id 1 for calling the ImputerTestCase obj's underlying member method code with example usage: obj.setUpClass() without return types