gov.sandia.cognition.statistics.bayesian
Class GaussianProcessRegression<InputType>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.function.kernel.DefaultKernelContainer<InputType>
          extended by gov.sandia.cognition.statistics.bayesian.GaussianProcessRegression<InputType>
Type Parameters:
InputType - Type of inputs to map through the kernel
All Implemented Interfaces:
BatchLearner<Collection<? extends InputOutputPair<? extends InputType,Double>>,MultivariateGaussian>, KernelContainer<InputType>, BayesianEstimator<InputOutputPair<? extends InputType,Double>,Vector,MultivariateGaussian>, CloneableSerializable, Serializable, Cloneable

@PublicationReferences(references={@PublicationReference(author="Christopher M. Bishop",title="Pattern Recognition and Machine Learning",type=Book,year=2006,pages={303,312}),@PublicationReference(author="Hanna M. Wallach",title="Introduction to Gaussian Process Regression",type=Misc,year=2005,url="http://www.cs.umass.edu/~wallach/talks/gp_intro.pdf"),@PublicationReference(author="Wikipedia",title="Kriging",type=WebPage,year=2010,url="http://en.wikipedia.org/wiki/Kriging")})
public class GaussianProcessRegression<InputType>
extends DefaultKernelContainer<InputType>
implements BayesianEstimator<InputOutputPair<? extends InputType,Double>,Vector,MultivariateGaussian>

Gaussian Process Regression, is also known as Kriging, is a nonparametric method to interpolate and extrapolate using Bayesian regression, where the expressiveness of the estimator can grow with the data. However, GPR does not scale well as it requires a N-cubed inversion, where N is the number of data points, to compute the predictive distribution.

Since:
3.0
Author:
Kevin R. Dixon
See Also:
Serialized Form

Nested Class Summary
 class GaussianProcessRegression.PredictiveDistribution
          Predictive distribution for Gaussian Process Regression.
 
Field Summary
static double DEFAULT_MEASUREMENT_VARIANCE
          Default assumed variance of the measurements, 1.0.
 
Fields inherited from class gov.sandia.cognition.learning.function.kernel.DefaultKernelContainer
kernel
 
Constructor Summary
GaussianProcessRegression()
          Creates a new instance of GaussianProcessRegression
GaussianProcessRegression(Kernel<InputType> kernel, double outputVariance)
          Creates a new instance of GaussianProcessRegression
 
Method Summary
 GaussianProcessRegression<InputType> clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
 GaussianProcessRegression.PredictiveDistribution createPredictiveDistribution(MultivariateGaussian posterior, ArrayList<InputType> inputs)
          Creates the predictive distribution for future points.
 double getOutputVariance()
          Getter for outputVariance
 MultivariateGaussian learn(Collection<? extends InputOutputPair<? extends InputType,Double>> data)
          The learn method creates an object of ResultType using data of type DataType, using some form of "learning" algorithm.
 void setOutputVariance(double outputVariance)
          Getter for outputVariance
 
Methods inherited from class gov.sandia.cognition.learning.function.kernel.DefaultKernelContainer
getKernel, setKernel
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MEASUREMENT_VARIANCE

public static final double DEFAULT_MEASUREMENT_VARIANCE
Default assumed variance of the measurements, 1.0.

See Also:
Constant Field Values
Constructor Detail

GaussianProcessRegression

public GaussianProcessRegression()
Creates a new instance of GaussianProcessRegression


GaussianProcessRegression

public GaussianProcessRegression(Kernel<InputType> kernel,
                                 double outputVariance)
Creates a new instance of GaussianProcessRegression

Parameters:
kernel - Kernel to map the InputType to the Vector space
outputVariance - Assumed known variance of the outputs (measurements), must be greater than or equal to zero.
Method Detail

clone

public GaussianProcessRegression<InputType> clone()
Description copied from class: AbstractCloneableSerializable
This makes public the clone method on the Object class and removes the exception that it throws. Its default behavior is to automatically create a clone of the exact type of object that the clone is called on and to copy all primitives but to keep all references, which means it is a shallow copy. Extensions of this class may want to override this method (but call super.clone() to implement a "smart copy". That is, to target the most common use case for creating a copy of the object. Because of the default behavior being a shallow copy, extending classes only need to handle fields that need to have a deeper copy (or those that need to be reset). Some of the methods in ObjectUtil may be helpful in implementing a custom clone method. Note: The contract of this method is that you must use super.clone() as the basis for your implementation.

Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class DefaultKernelContainer<InputType>
Returns:
A clone of this object.

learn

public MultivariateGaussian learn(Collection<? extends InputOutputPair<? extends InputType,Double>> data)
Description copied from interface: BatchLearner
The learn method creates an object of ResultType using data of type DataType, using some form of "learning" algorithm.

Specified by:
learn in interface BatchLearner<Collection<? extends InputOutputPair<? extends InputType,Double>>,MultivariateGaussian>
Parameters:
data - The data that the learning algorithm will use to create an object of ResultType.
Returns:
The object that is created based on the given data using the learning algorithm.

getOutputVariance

public double getOutputVariance()
Getter for outputVariance

Returns:
Assumed known variance of the outputs (measurements), must be greater than or equal to zero.

setOutputVariance

public void setOutputVariance(double outputVariance)
Getter for outputVariance

Parameters:
outputVariance - Assumed known variance of the outputs (measurements), must be greater than or equal to zero.

createPredictiveDistribution

public GaussianProcessRegression.PredictiveDistribution createPredictiveDistribution(MultivariateGaussian posterior,
                                                                                     ArrayList<InputType> inputs)
Creates the predictive distribution for future points.

Parameters:
posterior - Posterior from the fitting of the training data.
inputs - Training data inputs
Returns:
Predictive distribution of the Gaussian Process Regression