class_docstr: Unit tests for the MFGPFitter class. 
class_docstr_tok: ["Unit","tests","for","the","MFGPFitter","class","."]
docstr: Test for prediction. 
docstr_tok: ["Test","for","prediction","."]
code: def test_eval(self):
      """Test for prediction."""
      self.report(
          "Prediction for fitted Simple vs MF GPs. Probabilistic test, might fail."
      )
      num_successes = 0
      num_experiments = 0
      for ds_idx, ds in enumerate(self.datasets):
          for kernel_type in ["se", "matern"]:
              simple_gp = fit_simple_gp_with_dataset(ds, kernel_type)
              simple_preds, _ = simple_gp.eval(ds.ZX_te)
              simple_err = compute_average_sq_prediction_error(
                  ds.Y_te, simple_preds
              )
              mfgp = fit_mfgp_with_dataset(ds, kernel_type)
              mf_preds, _ = mfgp.eval_at_fidel(ds.Z_te, ds.X_te)
              mf_err = compute_average_sq_prediction_error(
                  ds.Y_te, mf_preds
              )
              # Book keep and report
              success = abs(mf_err - simple_err) < 1e-2
              num_successes += success
              num_experiments += 1
              self.report(
                  (
                      "%d. (N,DZ,DX)= %s, kern=%s, simple-err=%0.4f, mfgp-err=%0.4f, "
                      + "succ=%d."
                  )
                  % (
                      ds_idx + 1,
                      str(ds.Z_tr.shape + (ds.X_tr.shape[1],)),
                      kernel_type,
                      simple_err,
                      mf_err,
                      success,
                  ),
                  "test_result",
              )
      assert num_successes > 0.6 * num_experiments
  
imports: from __future__ import division
  from argparse import Namespace
  from copy import deepcopy
  import numpy
  from .None import kernel
  from .unittest_euclidean_gp import fit_se_gp_with_dataset, fit_matern_gp_with_dataset, fit_poly_gp_with_dataset
  from .None import euclidean_gp
  from ..utils.base_test_class import BaseTestClass, execute_tests
  from ..utils.general_utils import compute_average_sq_prediction_error
  from ..utils.option_handler import load_options
label_desc: Use image node_id 3 for calling the EuclideanMFGPFitterTestCase obj's underlying member method code with example usage: obj.test_eval() without return types