An emulator's suitability can be checked in a number of ways. This function combines all
current diagnostics available in the package, returning a context-dependent data.frame
containing the results.
Comparison Diagnostics (cd): Given a set of points, the emulator expectation and variance
are calculated. This gives a predictive range for the input point, according to the
emulator. We compare this against the actual value given by the simulator: points whose
emulator prediction is further away from the simulator prediction are to be investigated.
This 'distance' is given by stdev, and an emulator prediction correspondingly
should not be further away from the simulator value than stdev*uncertainty.
Classification Error (ce): Given a set of targets, the emulator can determine implausibility
of a point with respect to the relevant target, accepting or rejecting it as appropriate.
We can define a similar `implausibility' function for the simulator: the combination of
the two rejection schemes gives four classifications of points. Any point where the
emulator would reject the point but the simulator would not should be investigated.
Standardized Error (se): The known value at a point, combined with the emulator expectation
and uncertainty, can be combined to provide a standardized error for a point. This error
should not be too large, in general. but the diagnostic is more useful when looking at
a collection of such measures, where systematic bias or over/underconfidence can be seen.
Which of the diagnostics is performed can be controlled by the which_diag argument.
If performing classification error diagnostics, a set of targets must be provided; for all
diagnostics, a validation (or holdout) set can be provided. If no such set is given, then
the emulator diagnostics are performed with respect to its training points, using k-fold
cross-validation.