Daniel@0: Daniel@0:
Daniel@0:Daniel@0: net = gpinit(net, trin, trtargets, prior) Daniel@0: net = gpinit(net, trin, trtargets, prior) Daniel@0:Daniel@0: Daniel@0: Daniel@0:
net = gpinit(net, trin, trtargets)
takes a Gaussian Process data structure net
Daniel@0: together
Daniel@0: with a matrix trin
of training input vectors and a matrix trtargets
of
Daniel@0: training target
Daniel@0: vectors, and stores them in net
. These datasets are required if
Daniel@0: the corresponding inverse covariance matrix is not supplied to gpfwd
.
Daniel@0: This is important if the data structure is saved and then reloaded before
Daniel@0: calling gpfwd
.
Daniel@0: Each row
Daniel@0: of trin
corresponds to one input vector and each row of trtargets
Daniel@0: corresponds to one target vector.
Daniel@0:
Daniel@0: net = gpinit(net, trin, trtargets, prior)
additionally initialises the
Daniel@0: parameters in net
from the prior
data structure which contains the
Daniel@0: mean and variance of the Gaussian distribution which is sampled from.
Daniel@0:
Daniel@0:
x
Daniel@0: and targets t
:
Daniel@0: Daniel@0: Daniel@0: net = gp(2, 'sqexp'); Daniel@0: net = gpinit(net, x, t); Daniel@0: % Train the network Daniel@0: save 'gp.net' net; Daniel@0:Daniel@0: Daniel@0: Another Matlab program can now read in the network and make predictions on a data set Daniel@0:
testin
:
Daniel@0: Daniel@0: Daniel@0: load 'gp.net'; Daniel@0: pred = gpfwd(net, testin); Daniel@0:Daniel@0: Daniel@0: Daniel@0:
gp
, gpfwd
Copyright (c) Ian T Nabney (1996-9) Daniel@0: Daniel@0: Daniel@0: Daniel@0: