Package jgpml.covariancefunctions
Class CovNNoneNoise
java.lang.Object
jgpml.covariancefunctions.CovNNoneNoise
- All Implemented Interfaces:
CovarianceFunction
Neural network covariance function with a single parameter for the distance measure and white noise. The covariance
function is parameterized as:
k(x^p,x^q) = sf2 * asin(x^p'*P*x^q / sqrt[(1+x^p'*P*x^p)*(1+x^q'*P*x^q)]) + s2 * \delta(p,q)
where the x^p and x^q vectors on the right hand side have an added extra bias entry with unit value. P is ell^-2 times the unit matrix and sf2 controls the signal variance. The hyperparameters are:
[ log(ell) log(sqrt(sf2) log(s2)]
For reson of speed consider to use this covariance function instead of CovSum(CovNNone,CovNoise)
-
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
static void
int
Returns the number of hyperparameters of thisCovarianceFunction
-
Constructor Details
-
CovNNoneNoise
public CovNNoneNoise()
-
-
Method Details
-
main
-
numParameters
public int numParameters()Returns the number of hyperparameters of thisCovarianceFunction
- 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
-