Package jgpml.covariancefunctions
Class CovSEiso
java.lang.Object
jgpml.covariancefunctions.CovSEiso
- All Implemented Interfaces:
CovarianceFunction
Squared Exponential covariance function with isotropic 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 ell^2 times the unit matrix and sf2 is the signal variance. The hyperparameters are:
[ log(ell) log(sqrt(sf2)) ]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionJama.Matrixcompute(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.MatrixcomputeDerivatives(Jama.Matrix loghyper, Jama.Matrix X, int index) Coompute the derivatives of thisCovarianceFunctionwith respect to the hyperparameter with indexidxstatic voidintReturns the number of hyperparameters of thisCovarianceFunction
-
Constructor Details
-
CovSEiso
public CovSEiso()
-
-
Method Details
-
numParameters
public int numParameters()Returns the number of hyperparameters of thisCovarianceFunction- Specified by:
numParametersin 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:
computein interfaceCovarianceFunction- Parameters:
loghyper- columnMatrixof 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:
computein interfaceCovarianceFunction- Parameters:
loghyper- columnMatrixof 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 thisCovarianceFunctionwith respect to the hyperparameter with indexidx- Specified by:
computeDerivativesin interfaceCovarianceFunction- Parameters:
loghyper- hyperparametersX- input datasetindex- hyperparameter index- Returns:
Matrixof derivatives
-
main
-