GP-EVAL:  Evaluate function drawn from a Gaussian process over a grid.  

GP-eval displays functions drawn at random from the Gaussian processes
defined by values for hyperparameters stored at various iterations in
a log file.  If no training data is specified, the functions are drawn
from the prior defined by the hyperparameters; if there is training
data, the functions are drawn from the conditional process given this
training data, or from the conditional process given particular values
for the function at the training points and/or values for the noise
variance at each training point, if these are stored in the log file.

Usage:

    gp-eval log-file range [ [-]N ] { / low high grid-size } [ "targets" ]

N functions (default 1) are generated based on each iteration in the
named log-file, within the specified range.  The range has the usual
form, of "[low][:[high]][%mod]", with 'high' defaulting to 'low' if
the colon is absent, and to the end of the file if the colon is
present.  The random number seed used for the i'th function generated
for iteration t is 100*t+i, if no "-" precedes the value N, or just i,
if a "-" does precede N.  (The latter option may be useful to see how
the function generated by one seed varies with varying hyperparameter
values, though the effects are sensitive to the method used, based on
a Cholesky decomposition.)

Each group of the remaining arguments describes the grid along one
input dimension, with 'low' and 'high' being the range of the grid
along that dimension, and grid-size + 1 being the number of grid
points spread across that range.  The number of such argument groups
must be the same as the number of input dimensions, and currently cannot
be more than two.  

The output consists of a section for each function drawn, with
sections separated by blank lines.  Each section contains as many
lines as there are grid points, with each line giving the input values
followed by the output values.  When there is more than one input
variable, a blank line is output between groups of points where all
but the last variable are the same.  There must be only one output
value.

If the final argument is "targets", then rather than writing the
function values themselves, the program instead generates target
values from these outputs, as defined by the data model.  This option
is currently allowed only for real targets values.

If the covariance does not include a jitter part, and there is no
noise added (ie, "targets" is not specified for a regression model),
then gp-eval will add a small amount (1e-6) to the diagonal of the
covariance to try to prevent numerical problems.  Round off error may
still make the covariance matrix appear to not be positive definite,
however, in which case a message about not being able to find the 
Cholesky decomposition will appear.

Note that the grid gives the actual values for the inputs.  Any
transformations that may have been specified with "data-spec" are
ignored.  Similary, it is the raw function value (or generated target
value) that is displayed, without any transformation.

NOTE: The output produced with two inputs can be plotted as a surface
using "gnuplot".  Save the output of gp-eval in a file (eg, "plt"),
and then use the following gnuplot commands:

    set parametric
    set data style lines
    set hidden3d
    splot "plt"

The viewpoint can be changed with the "set view" and "replot" commands.

            Copyright (c) 1996 by Radford M. Neal