class_docstr: Unit test class for testing scikit-learn converter.
class_docstr_tok: ["Unit","test","class","for","testing","scikit-learn","converter","."]
code: def test_int_features_in_pipeline(self):
      rn.seed(0)
  
      x_train_dict = [
          dict((rn.randint(100), 1) for i in range(20))
          for j in range(100)
      ]
      y_train = [0, 1] * 50
  
      # multi_class default changed in version >= 0.22 from ‘ovr’ to ‘auto’.
      # Specify explicitly to match < 0.22 behavior.
      pl = Pipeline(
          [
              ("dv", DictVectorizer()),
              ("lm", LogisticRegression(multi_class="ovr")),
          ]
      )
      pl.fit(x_train_dict, y_train)
  
      model = coremltools.converters.sklearn.convert(
          pl, input_features="features", output_feature_names="target"
      )
  
      if _is_macos() and _macos_version() >= (10, 13):
          x = pd.DataFrame(
              {
                  "features": x_train_dict,
                  "target": pl.predict(x_train_dict),
              }
          )
  
          cur_eval_metics = evaluate_classifier(model, x)
          self.assertEqual(cur_eval_metics["num_errors"], 0)
  
file_path: coremltools/coremltools/test/sklearn_tests/test_dict_vectorizer.py
imports: import unittest
  import numpy
  import numpy.random
  import pandas
  import coremltools
  from coremltools._deps import _HAS_SKLEARN
  from coremltools.models.utils import _is_macos, _macos_version, evaluate_classifier, evaluate_transformer
label_desc: Use image node_id 4 for calling the DictVectorizerScikitTest obj's underlying member method code with example usage: obj.test_int_features_in_pipeline() without return types