Common Lisp Package: MGL-GP

Gaussian processes with support for training with backpropagation.

README:

FUNCTION

Public

GP-CONFIDENCES-AS-PLOT-DATA (GP INPUTS &KEY MEANS COVARIANCES (LEVELS-AND-OPTIONS '((0 title 'mean' with lines) (-1.96 title 'mean - 1.96 * stddev' with lines) (1.96 title 'mean + 1.96 * stddev' with lines))))

Return a list of MGL-GNUPLOT:DATA-MAPPINGs, one for each level in LEVELS-AND-OPTIONS (a list of (LEVEL OPTIONS)). Each mapping contains INPUTS in its first column, and MEANS + LEVEL*VARIANCES in the second.

GP-SAMPLES-AS-PLOT-DATA (GP INPUTS &KEY MEANS COVARIANCES OPTIONS)

Returns a matrix that contains INPUTS in its first column, and a sample taken with SAMPLE-GP in its second.

UPDATE-GP (GP INPUTS OUTPUTS &KEY MEANS COVARIANCES)

Update GP with the evidence embodied by INPUTS and the corresponding OUTPUTS. Return a new POSTERIOR-GP. If MEANS are COVARIANCES are given, then the call to GP-MEANS-AND-COVARIANCES is not made.

Undocumented

->GP (&REST ARGS)

GP-COVARIANCES (GP X1 &OPTIONAL (X2 X1))

GP-MEANS-AND-COVARIANCES (GP X1 &OPTIONAL (X2 X1))

Private

SAMPLE-GP (GP INPUTS &KEY MEANS COVARIANCES)

Return a sample from the multivariate normal distribution defined by GP at INPUTS as a column vector.

Undocumented

EXTRACT-COVARIANCES (LUMP STRIPE N-ROWS N-COLS)

EXTRACT-MEANS (LUMP STRIPE)

FIND-GP-LUMP (BPN)

GAUSSIAN-KERNEL (X1 X2 &KEY SIGNAL-VARIANCE (BIAS-VARIANCE 0) LENGTH-SCALE (ROUGHNESS 2))

GP-DATA-MATRIX (INPUTS OUTPUTS)

GP-DATA-MATRIX-FOR-LEVEL (INPUTS MEANS COVARIANCES LEVEL)

MAKE-MATRIX-FROM-LUMP-STRIPE (LUMP N-ROWS N-COLS STRIPE)

MAKE-VECTOR-FROM-LUMP-STRIPE (LUMP STRIPE)

POSTERIOR-GP-MEANS-AND-COVARIANCES (GP X1 X2 &KEY COMPUTE-COVARIANCES-P)

UPDATE-GP* (GP INPUTS OUTPUTS MEANS COVARIANCES)

GENERIC-FUNCTION

Public

GP-MEANS (GP X)

Returns the vector of means for the vector of inputs X. X is a vector of arbitrary objects.

GP-MEANS-AND-COVARIANCES* (GP X1 X2)

Returns two values: the means and the covariances as matrices.

Private

GP-COVARIANCES* (GP X1 X2)

Returns the matrix of covariances between X1 and X2. X1 and X2 are vectors of arbitrary objects. Noise is assumed to be included in the covariance function.

SLOT-ACCESSOR

Public

Undocumented

COVARIANCE-LUMP-NAME (OBJECT)

MEAN-LUMP-NAME (OBJECT)

PRIOR-GP (OBJECT)

Private

Undocumented

CENTERED-EVIDENCE-OUTPUTS (OBJECT)

COVARIANCE-FN (OBJECT)

COVARIANCES (OBJECT)

EVIDENCE-INPUTS (OBJECT)

EVIDENCE-OUTPUTS (OBJECT)

INVERTED-COVARIANCES (OBJECT)

MEAN-FN (OBJECT)

MEANS (OBJECT)

POSTERIOR-GPS (OBJECT)

SETFPOSTERIOR-GPS (NEW-VALUE OBJECT)

SAMPLES (OBJECT)

SETFSAMPLES (NEW-VALUE OBJECT)

CLASS

Public

PRIOR-GP (OBJECT)

A GP whose mean and covariance are defined by two lisp functions. Can be updated, but it's not trainable.

Undocumented

->GP (&REST ARGS)

BPN-GP

GP

POSTERIOR-GP