Class CovNNone

java.lang.Object
jgpml.covariancefunctions.CovNNone
All Implemented Interfaces:
CovarianceFunction

public class CovNNone extends Object implements CovarianceFunction
Neural network covariance function with a single parameter for the distance measure. 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)])

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) ]

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Jama.Matrix
    compute(Jama.Matrix loghyper, Jama.Matrix X)
    Compute covariance matrix of a dataset X
    Jama.Matrix[]
    compute(Jama.Matrix loghyper, Jama.Matrix X, Jama.Matrix Xstar)
    Compute compute test set covariances
    Jama.Matrix
    computeDerivatives(Jama.Matrix loghyper, Jama.Matrix X, int index)
    Coompute the derivatives of this CovarianceFunction with respect to the hyperparameter with index idx
    static void
    main(String[] args)
     
    int
    Returns the number of hyperparameters of thisCovarianceFunction

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CovNNone

      public CovNNone()
  • Method Details

    • main

      public static void main(String[] args)
    • numParameters

      public int numParameters()
      Returns the number of hyperparameters of thisCovarianceFunction
      Specified by:
      numParameters in interface CovarianceFunction
      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 interface CovarianceFunction
      Parameters:
      loghyper - column Matrix of hyperparameters
      X - 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 interface CovarianceFunction
      Parameters:
      loghyper - column Matrix of hyperparameters
      X - input dataset
      Xstar - 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 this CovarianceFunction with respect to the hyperparameter with index idx
      Specified by:
      computeDerivatives in interface CovarianceFunction
      Parameters:
      loghyper - hyperparameters
      X - input dataset
      index - hyperparameter index
      Returns:
      Matrix of derivatives