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):
      input_names = self.scikit_data.feature_names
      output_name = "target"
      spec = skl_converter.convert(
          self.scikit_model, input_names, "target"
      ).get_spec()
      self.assertIsNotNone(spec)
  
      # Test the model class
      self.assertIsNotNone(spec.description)
      self.assertIsNotNone(spec.treeEnsembleClassifier)
  
      # Test the interface class
      self.assertEquals(spec.description.predictedFeatureName, "target")
  
      # Test the inputs and outputs
      self.assertEquals(len(spec.description.output), 2)
      self.assertEquals(spec.description.output[0].name, "target")
      self.assertEquals(
          spec.description.output[0].type.WhichOneof("Type"),
          "int64Type",
      )
  
      for input_type in spec.description.input:
          self.assertEquals(
              input_type.type.WhichOneof("Type"), "doubleType"
          )
      self.assertEqual(
          sorted(input_names),
          sorted(map(lambda x: x.name, spec.description.input)),
      )
  
      self.assertEquals(len(spec.pipelineClassifier.pipeline.models), 2)
      tr = spec.pipelineClassifier.pipeline.models[
          -1
      ].treeEnsembleClassifier.treeEnsemble
      self.assertIsNotNone(tr)
      self.assertEquals(len(tr.nodes), 2970)
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/test/sklearn_tests/test_random_forest_classifier.py
imports: import unittest
  from coremltools._deps import _HAS_SKLEARN
  from coremltools.proto import Model_pb2
  from coremltools.proto import FeatureTypes_pb2
label_desc: Use image node_id 2 for calling the RandomForestMultiClassClassifierScikitTest obj's underlying member method code with example usage: obj.test_conversion() without return types