class_docstr: Unit tests for the GP class. 
class_docstr_tok: ["Unit","tests","for","the","GP","class","."]
docstr: Tests the evaluation. 
docstr_tok: ["Tests","the","evaluation","."]
code: def test_eval(self):
      """Tests the evaluation."""
      self.report("GP.eval: Probabilistic test, might fail sometimes")
      num_successes = 0
      for dataset in self.datasets:
          curr_gp = build_gp_with_dataset(dataset)
          curr_pred, _ = curr_gp.eval(dataset[3])
          curr_err = compute_average_prediction_error(
              dataset, curr_pred
          )
          const_err = compute_average_prediction_error(
              dataset, dataset[1].mean()
          )
          success = curr_err < const_err
          self.report(
              (
                  "(N,D)="
                  + str(dataset[0].shape)
                  + ":: GP-err= "
                  + str(curr_err)
                  + ",   Const-err= "
                  + str(const_err)
                  + ",  success="
                  + str(success)
              ),
              "test_result",
          )
          num_successes += int(success)
      assert num_successes > 0.6 * len(self.datasets)
  
file_path: dragonfly/dragonfly/gp/unittest_gp_core.py
imports: from __future__ import absolute_import
  from __future__ import division
  from ..utils.base_test_class import BaseTestClass, execute_tests
  import numpy
  from .gp_core import GP
  from .kernel import SEKernel
label_desc: Use image node_id 3 for calling the GPTestCase obj's underlying member method code with example usage: obj.test_eval() without return types