class_docstr: Unit test class for testing scikit-learn converter.
class_docstr_tok: ["Unit","test","class","for","testing","scikit-learn","converter","."]
code: def test_conversion(self):
      feature_names = self.scikit_data.feature_names
      output_name = "target"
      spec = skl_converter.convert(
          self.scikit_model, feature_names, "target"
      ).get_spec()
      self.assertIsNotNone(spec)
  
      # Test the model class
      self.assertIsNotNone(spec.description)
      self.assertIsNotNone(spec.treeEnsembleRegressor)
  
      # Test the interface class
      self.assertEqual(spec.description.predictedFeatureName, "target")
  
      # Test the inputs and outputs
      self.assertEqual(len(spec.description.output), 1)
      self.assertEqual(spec.description.output[0].name, "target")
      self.assertEqual(
          spec.description.output[0].type.WhichOneof("Type"),
          "doubleType",
      )
      for input_type in spec.description.input:
          self.assertEqual(
              input_type.type.WhichOneof("Type"), "doubleType"
          )
      self.assertEqual(
          sorted(feature_names),
          sorted(map(lambda x: x.name, spec.description.input)),
      )
  
      # Test the linear regression parameters.
      tr = spec.pipelineRegressor.pipeline.models[
          1
      ].treeEnsembleRegressor.treeEnsemble
      self.assertIsNotNone(tr)
      self.assertEqual(len(tr.nodes), 935)
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/test/xgboost_tests/test_decision_tree_regression.py
imports: import unittest
  import tempfile
  import json
  from coremltools.proto import Model_pb2
  from coremltools.proto import FeatureTypes_pb2
  from coremltools._deps import _HAS_XGBOOST
  from coremltools._deps import _HAS_SKLEARN
label_desc: Use image node_id 2 for calling the DecisionTreeRegressorScikitTest obj's underlying member method code with example usage: obj.test_conversion() without return types