class_docstr: Test Gaussian Hyperparameter Optimization.
class_docstr_tok: ["Test","Gaussian","Hyperparameter","Optimization","."]
docstr: Test a simple example of optimizing a RF model with a gaussian process looking for minimum score.
docstr_tok: ["Test","a","simple","example","of","optimizing","a","RF","model","with","a","gaussian","process","looking","for","minimum","score","."]
code: def test_rf_example_min(self):
      """Test a simple example of optimizing a RF model with a gaussian process looking for minimum score."""
  
      optimizer = dc.hyper.GaussianProcessHyperparamOpt(
          self.rf_model_builder, max_iter=2
      )
      params_dict = {"n_estimators": 10}
      transformers = []
      metric = dc.metrics.Metric(dc.metrics.pearson_r2_score)
  
      (
          best_model,
          best_hyperparams,
          all_results,
      ) = optimizer.hyperparam_search(
          params_dict,
          self.train_dataset,
          self.valid_dataset,
          metric,
          transformers,
          use_max=False,
      )
  
      valid_score = best_model.evaluate(
          self.valid_dataset, [metric], transformers
      )
      assert valid_score["pearson_r2_score"] == min(
          all_results.values()
      )
      assert valid_score["pearson_r2_score"] > 0
  
file_path: deepchem/deepchem/hyper/tests/test_gaussian_hyperparam_opt.py
imports: import numpy
  import sklearn
  import sklearn.ensemble
  import deepchem
  import unittest
  import pytest
  import tempfile
  from flaky import flaky
label_desc: Use image node_id 3 for calling the TestGaussianHyperparamOpt obj's underlying member method code with example usage: obj.test_rf_example_min() without return types