Package jgpml.covariancefunctions
Class CovSEard
java.lang.Object
jgpml.covariancefunctions.CovSEard
- All Implemented Interfaces:
CovarianceFunction
Squared Exponential covariance function with Automatic Relevance Detemination (ARD) distance measure. The covariance
function is parameterized as:
k(x^p,x^q) = sf2 * exp(-(x^p - x^q)'*inv(P)*(x^p - x^q)/2)
where the P matrix is diagonal with ARD parameters ell_1^2,...,ell_D^2, where D is the dimension of the input space and sf2 is the signal variance. The hyperparameters are:
[ log(ell_1) log(ell_2) . log(ell_D) log(sqrt(sf2))]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionJama.Matrix
compute
(Jama.Matrix loghyper, Jama.Matrix X) Compute covariance matrix of a dataset XJama.Matrix[]
compute
(Jama.Matrix loghyper, Jama.Matrix X, Jama.Matrix Xstar) Compute compute test set covariancesJama.Matrix
computeDerivatives
(Jama.Matrix loghyper, Jama.Matrix X, int index) Coompute the derivatives of thisCovarianceFunction
with respect to the hyperparameter with indexidx
int
Returns the number of hyperparameters ofCovSEard
-
Constructor Details
-
CovSEard
public CovSEard(int inputDimension) Creates a newCovSEard CovarianceFunction
- Parameters:
inputDimension
- muber of dimension of the input
-
-
Method Details
-
numParameters
public int numParameters()Returns the number of hyperparameters ofCovSEard
- Specified by:
numParameters
in interfaceCovarianceFunction
- Returns:
- number of hyperparameters
-
compute
public Jama.Matrix compute(Jama.Matrix loghyper, Jama.Matrix X) Compute covariance matrix of a dataset X- Specified by:
compute
in interfaceCovarianceFunction
- Parameters:
loghyper
- columnMatrix
of hyperparametersX
- input dataset- Returns:
- K covariance
Matrix
-
compute
public Jama.Matrix[] compute(Jama.Matrix loghyper, Jama.Matrix X, Jama.Matrix Xstar) Compute compute test set covariances- Specified by:
compute
in interfaceCovarianceFunction
- Parameters:
loghyper
- columnMatrix
of hyperparametersX
- input datasetXstar
- test set- Returns:
- [K(Xstar, Xstar) K(X,Xstar)]
-
computeDerivatives
public Jama.Matrix computeDerivatives(Jama.Matrix loghyper, Jama.Matrix X, int index) Coompute the derivatives of thisCovarianceFunction
with respect to the hyperparameter with indexidx
- Specified by:
computeDerivatives
in interfaceCovarianceFunction
- Parameters:
loghyper
- hyperparametersX
- input datasetindex
- hyperparameter index- Returns:
Matrix
of derivatives
-