class_docstr: Unit test class for testing scikit-learn converter.
class_docstr_tok: ["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(cls):
      """
      Set up the unit test by loading the dataset and training a model.
      """
      if not _HAS_SKLEARN:
          return
  
      scikit_data = load_boston()
      scikit_model = GradientBoostingRegressor(random_state=1)
      scikit_model.fit(scikit_data["data"], scikit_data["target"])
  
      s = 0
      for est in scikit_model.estimators_:
          for e in est:
              s = s + e.tree_.node_count
      cls.scikit_model_node_count = s
  
      # Save the data and the model
      cls.scikit_data = scikit_data
      cls.scikit_model = scikit_model
  
file_path: coremltools/coremltools/test/xgboost_tests/test_boosted_trees_regression.py
imports: import json
  import tempfile
  import unittest
  from coremltools._deps import _HAS_SKLEARN, _HAS_XGBOOST
  from coremltools.models.utils import _macos_version
label_desc: Use image node_id 1 for calling the GradientBoostingRegressorScikitTest obj's underlying member method code with example usage: obj.setUpClass(cls) without return types