Class

com.linkedin.photon.ml.hyperparameter.estimators.kernels

Matern52

Related Doc: package kernels

Permalink

class Matern52 extends StationaryKernel

Implements the Matérn 5/2 covariance kernel.

The Matern kernel is a generalization of the RBF kernel with an additional parameter $\nu$ that allows controlling smoothness. At $\nu = \infty$, the Matern kernel is equivalent to RBF. At $\nu = 0.5$, it's equivalent to the absolute exponential kernel. It's noted in the literature that $\nu = 2.5$ allows the kernel to closely approximate hyperparameter spaces where the smoothness of RBF causes issues (see PBO). Here we hard-code to the 5/2 value because the computation is much simpler than allowing a user-defined $\nu$.

$K(x,x') = \big(\sqrt{5r2(x,x')} + \frac{5}{3} r2(x,x') + 1\big) \exp(-\sqrt{5r^2(x,x')})$

Where $r(x,x')$ is the Euclidean distance between $x$ and $x'$.

See also

"Practical Bayesian Optimization of Machine Learning Algorithms" (PBO), https://papers.nips.cc/paper/4522-practical-bayesian-optimization-of-machine-learning-algorithms.pdf

"Gaussian Processes for Machine Learning" (GPML), http://www.gaussianprocess.org/gpml/, Chapter 4

Linear Supertypes
StationaryKernel, Kernel, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Matern52
  2. StationaryKernel
  3. Kernel
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Matern52(amplitude: Double = 1.0, noise: Double = 1e-4, lengthScale: DenseVector[Double] = DenseVector(1.0))

    Permalink

    amplitude

    the covariance amplitude

    noise

    the observation noise

    lengthScale

    the length scale of the kernel. This controls the complexity of the kernel, or the degree to which it can vary within a given region of the function's domain. Higher values allow less variation, and lower values allow more.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val amplitudeScale: Double

    Permalink
    Definition Classes
    StationaryKernel
  5. def apply(x1: DenseMatrix[Double], x2: DenseMatrix[Double]): DenseMatrix[Double]

    Permalink

    Applies the kernel functions to the two sets of points

    Applies the kernel functions to the two sets of points

    x1

    the matrix containing the first set of points, where each of the m rows is a point in the space

    x2

    the matrix containing the second set of points, where each of the p rows is a point in the space

    returns

    the m x p covariance matrix

    Definition Classes
    StationaryKernelKernel
  6. def apply(x: DenseMatrix[Double]): DenseMatrix[Double]

    Permalink

    Applies the kernel function to the given points

    Applies the kernel function to the given points

    x

    the matrix of points, where each of the m rows is a point in the space

    returns

    the m x m covariance matrix

    Definition Classes
    StationaryKernelKernel
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def expandDimensions(param: DenseVector[Double], dim: Int): DenseVector[Double]

    Permalink

    If only one parameter value has been specified, builds a new vector with the single value repeated to fill all dimensions

    If only one parameter value has been specified, builds a new vector with the single value repeated to fill all dimensions

    param

    the initial parameters

    dim

    the dimensions of the final vector

    returns

    the vector with all dimensions specified

    Definition Classes
    Kernel
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def fromPairwiseDistances(dists: DenseMatrix[Double]): DenseMatrix[Double]

    Permalink

    Computes the Matern 5/2 kernel function from the pairwise distances between points.

    Computes the Matern 5/2 kernel function from the pairwise distances between points.

    dists

    the m x p matrix of pairwise distances between m and p points

    returns

    the m x p covariance matrix

    Attributes
    protected[com.linkedin.photon.ml.hyperparameter.estimators.kernels]
    Definition Classes
    Matern52StationaryKernel
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def getInitialKernel(x: DenseMatrix[Double], y: DenseVector[Double]): Kernel

    Permalink

    Builds a kernel with initial settings, based on the observations

    Builds a kernel with initial settings, based on the observations

    x

    the observed features

    y

    the observed labels

    returns

    the initial kernel

    Definition Classes
    Matern52Kernel
  16. def getParams: DenseVector[Double]

    Permalink

    Returns the kernel parameters as a vector

    Returns the kernel parameters as a vector

    returns

    the kernel parameters

    Definition Classes
    StationaryKernelKernel
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. val lengthScaleMax: Double

    Permalink
    Definition Classes
    StationaryKernel
  20. def logLikelihood(x: DenseMatrix[Double], y: DenseVector[Double]): Double

    Permalink

    Computes the log likelihood of the kernel parameters

    Computes the log likelihood of the kernel parameters

    x

    the observed features

    y

    the observed labels

    returns

    the log likelihood

    Definition Classes
    StationaryKernelKernel
  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. val noiseScale: Double

    Permalink
    Definition Classes
    StationaryKernel
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. def pairwiseDistances(x1: DenseMatrix[Double], x2: DenseMatrix[Double]): DenseMatrix[Double]

    Permalink

    Computes the pairwise squared distance between the points in two sets

    Computes the pairwise squared distance between the points in two sets

    x1

    the matrix containing the first set of points, where each of the m rows is a point in the space

    x2

    the matrix containing the second set of points, where each of the p rows is a point in the space

    returns

    the m x p matrix of distances

    Attributes
    protected[com.linkedin.photon.ml.hyperparameter.estimators.kernels]
    Definition Classes
    StationaryKernel
  26. def pairwiseDistances(x: DenseMatrix[Double]): DenseMatrix[Double]

    Permalink

    Computes the pairwise squared distances between all points

    Computes the pairwise squared distances between all points

    x

    the matrix of points, where each of the m rows is a point in the space

    returns

    the m x m matrix of distances

    Attributes
    protected[com.linkedin.photon.ml.hyperparameter.estimators.kernels]
    Definition Classes
    StationaryKernel
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. def withParams(theta: DenseVector[Double]): Kernel

    Permalink

    Creates a new kernel function of the same type, with the given parameters

    Creates a new kernel function of the same type, with the given parameters

    theta

    the parameter vector for the new kernel function

    returns

    the new kernel function

    Definition Classes
    Matern52Kernel

Inherited from StationaryKernel

Inherited from Kernel

Inherited from AnyRef

Inherited from Any

Ungrouped