code: def _test_model_selection(
      self,
      model_selection_class,
      base_classifier,
      parameters,
      score_w_train_data=False,
      **kwargs,
  ):
      for data in [datasets.load_breast_cancer(), datasets.load_iris()]:
          X, y = data.data, data.target
          X = X.astype(np.float32)
  
          model = model_selection_class(
              base_classifier, parameters, cv=5, **kwargs
          )
  
          n_train_rows = int(X.shape[0] * 0.6)
          model.fit(X[:n_train_rows, :], y[:n_train_rows])
  
          if not score_w_train_data:
              X = X[n_train_rows:, :]
  
          torch_model = hummingbird.ml.convert(model, "torch")
          self.assertTrue(torch_model is not None)
          np.testing.assert_allclose(
              model.predict_proba(X),
              torch_model.predict_proba(X),
              rtol=1e-6,
              atol=1e-5,
          )
  
file_path: hummingbird/tests/test_sklearn_model_selection.py
imports: import unittest
  import warnings
  import numpy
  import torch
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.model_selection import GridSearchCV, RandomizedSearchCV
  from sklearn.metrics import make_scorer, accuracy_score
  from sklearn import datasets
  import hummingbird.ml
label_desc: Use image node_id 1 for calling the TestSklearnModelSelection obj's underlying member method code with example usage: obj._test_model_selection(model_selection_class, base_classifier, parameters, score_w_train_data) without return types