Class/Object

io.github.mandar2812.dynaml.models.gp

AbstractGPRegressionModel

Related Docs: object AbstractGPRegressionModel | package gp

Permalink

abstract class AbstractGPRegressionModel[T, I] extends ContinuousProcessModel[T, I, Double, MultGaussianPRV] with SecondOrderProcessModel[T, I, Double, Double, DenseMatrix[Double], MultGaussianPRV] with GloballyOptWithGrad

Gaussian Process Regression

Single-Output Gaussian Process Regression Model Performs gp/spline smoothing/regression with vector inputs and a singular scalar output.

T

The data structure holding the training data.

I

The index set over which the Gaussian Process is defined. e.g:

  • I = Double when implementing GP time series
  • I = DenseVector when implementing GP regression
Linear Supertypes
GloballyOptWithGrad, GloballyOptimizable, SecondOrderProcessModel[T, I, Double, Double, DenseMatrix[Double], MultGaussianPRV], ContinuousProcessModel[T, I, Double, MultGaussianPRV], StochasticProcessModel[T, I, Double, MultGaussianPRV], Model[T, I, Double], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AbstractGPRegressionModel
  2. GloballyOptWithGrad
  3. GloballyOptimizable
  4. SecondOrderProcessModel
  5. ContinuousProcessModel
  6. StochasticProcessModel
  7. Model
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AbstractGPRegressionModel(cov: LocalScalarKernel[I], n: LocalScalarKernel[I], data: T, num: Int, meanFunc: DataPipe[I, Double] = DataPipe((_:I) => 0.0))(implicit arg0: ClassTag[I])

    Permalink

    cov

    The covariance function/kernel of the GP model, expressed as a LocalScalarKernel instance

    n

    Measurement noise covariance of the GP model.

    data

    Training data set of generic type T

    num

    The number of training data instances.

    meanFunc

    The mean/trend function of the GP model expressed as a DataPipe instance.

Abstract Value Members

  1. abstract def dataAsSeq(data: T): Seq[(I, Double)]

    Permalink

    Convert from the underlying data structure to Seq[(I, Y)] where I is the index set of the GP and Y is the value/label type.

    Convert from the underlying data structure to Seq[(I, Y)] where I is the index set of the GP and Y is the value/label type.

    Definition Classes
    StochasticProcessModel

Concrete 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. def _blockSize: Int

    Permalink
  5. def _current_state: Map[String, Double]

    Permalink
    Definition Classes
    GloballyOptimizable
  6. def _errorSigma: Int

    Permalink
    Definition Classes
    ContinuousProcessModel
  7. def _hyper_parameters: List[String]

    Permalink
    Definition Classes
    GloballyOptimizable
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. var blockSize: Int

    Permalink
    Attributes
    protected
  10. def blockSize_(b: Int): Unit

    Permalink
  11. var caching: Boolean

    Permalink
    Attributes
    protected
  12. def calculateEnergyPipe(h: Map[String, Double], options: Map[String, String]): DataPipe2[Seq[I], PartitionedVector, Double]

    Permalink

    Returns a DataPipe2 which calculates the energy of data: T.

    Returns a DataPipe2 which calculates the energy of data: T. See: energy below.

  13. def calculateGradEnergyPipe(h: Map[String, Double]): DataPipe2[Seq[I], PartitionedVector, Map[String, Double]]

    Permalink

    Returns a DataPipe which calculates the gradient of the energy, E(.) of data: T with respect to the model hyper-parameters.

    Returns a DataPipe which calculates the gradient of the energy, E(.) of data: T with respect to the model hyper-parameters. See: gradEnergy below.

  14. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. val covariance: LocalScalarKernel[I]

    Permalink

    Underlying covariance function of the Gaussian Processes.

    Underlying covariance function of the Gaussian Processes.

    Definition Classes
    AbstractGPRegressionModelSecondOrderProcessModel
  16. var current_state: Map[String, Double]

    Permalink

    A Map which stores the current state of the system.

    A Map which stores the current state of the system.

    Attributes
    protected
    Definition Classes
    AbstractGPRegressionModelGloballyOptimizable
  17. def data: T

    Permalink
    Definition Classes
    Model
  18. def dataAsIndexSeq(data: T): Seq[I]

    Permalink

    Convert from the underlying data structure to Seq[I] where I is the index set of the GP

    Convert from the underlying data structure to Seq[I] where I is the index set of the GP

    Definition Classes
    StochasticProcessModel
  19. def energy(h: Map[String, Double], options: Map[String, String]): Double

    Permalink

    Calculates the energy of the configuration, in most global optimization algorithms we aim to find an approximate value of the hyper-parameters such that this function is minimized.

    Calculates the energy of the configuration, in most global optimization algorithms we aim to find an approximate value of the hyper-parameters such that this function is minimized.

    h

    The value of the hyper-parameters in the configuration space

    options

    Optional parameters about configuration

    returns

    Configuration Energy E(h) In this particular case E(h) = -log p(Y|X,h) also known as log likelihood.

    Definition Classes
    AbstractGPRegressionModelGloballyOptimizable
  20. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. def errorSigma_(s: Int): Unit

    Permalink
    Definition Classes
    ContinuousProcessModel
  23. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. val g: T

    Permalink

    The training data

    The training data

    Attributes
    protected
    Definition Classes
    AbstractGPRegressionModelModel
  25. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  26. def getCrossKernelMatrix[U <: Seq[I]](test: U): PartitionedMatrix

    Permalink
    Attributes
    protected
  27. def getTestKernelMatrix[U <: Seq[I]](test: U): PartitionedPSDMatrix

    Permalink
    Attributes
    protected
  28. def getTrainKernelMatrix[U <: Seq[I]]: PartitionedPSDMatrix

    Permalink
    Attributes
    protected
  29. def gradEnergy(h: Map[String, Double]): Map[String, Double]

    Permalink

    Calculates the gradient energy of the configuration and subtracts this from the current value of h to yield a new hyper-parameter configuration.

    Calculates the gradient energy of the configuration and subtracts this from the current value of h to yield a new hyper-parameter configuration.

    Over ride this function if you aim to implement a gradient based hyper-parameter optimization routine like ML-II

    h

    The value of the hyper-parameters in the configuration space

    returns

    Gradient of the objective function (marginal likelihood) as a Map

    Definition Classes
    AbstractGPRegressionModelGloballyOptWithGrad
  30. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  31. var hyper_parameters: List[String]

    Permalink

    Stores the names of the hyper-parameters

    Stores the names of the hyper-parameters

    Attributes
    protected
    Definition Classes
    AbstractGPRegressionModelGloballyOptimizable
  32. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  33. var kernelMatrixCache: DenseMatrix[Double]

    Permalink
    Attributes
    protected
  34. val mean: DataPipe[I, Double]

    Permalink

    The GP is taken to be zero mean, or centered.

    The GP is taken to be zero mean, or centered. This is ensured by standardization of the data before being used for further processing.

    Definition Classes
    AbstractGPRegressionModelSecondOrderProcessModel
  35. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  36. val noiseModel: LocalScalarKernel[I]

    Permalink
  37. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  39. val npoints: Int

    Permalink
  40. var partitionedKernelMatrixCache: PartitionedPSDMatrix

    Permalink
    Attributes
    protected
  41. def persist(state: Map[String, Double]): Unit

    Permalink

    Cache the training kernel and noise matrices for fast access in future predictions.

    Cache the training kernel and noise matrices for fast access in future predictions.

    Definition Classes
    AbstractGPRegressionModelGloballyOptimizable
  42. def predict(point: I): Double

    Permalink

    Predict the value of the target variable given a point.

    Predict the value of the target variable given a point.

    Definition Classes
    AbstractGPRegressionModelModel
  43. def predictionWithErrorBars[U <: Seq[I]](testData: U, sigma: Int): Seq[(I, Double, Double, Double)]

    Permalink

    Draw three predictions from the posterior predictive distribution

    Draw three predictions from the posterior predictive distribution

    • Mean or MAP estimate Y
    • Y- : The lower error bar estimate (mean - sigma*stdDeviation)
    • Y+ : The upper error bar. (mean + sigma*stdDeviation)
    Definition Classes
    AbstractGPRegressionModelContinuousProcessModel
  44. def predictiveDistribution[U <: Seq[I]](test: U): MultGaussianPRV

    Permalink

    Calculates posterior predictive distribution for a particular set of test data points.

    Calculates posterior predictive distribution for a particular set of test data points.

    test

    A Sequence or Sequence like data structure storing the values of the input patters.

    Definition Classes
    AbstractGPRegressionModelStochasticProcessModel
  45. def setState(s: Map[String, Double]): AbstractGPRegressionModel.this.type

    Permalink

    Set the model "state" which contains values of its hyper-parameters with respect to the covariance and noise kernels.

  46. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  47. def test(testData: T): Seq[(I, Double, Double, Double, Double)]

    Permalink

    Returns a prediction with error bars for a test set of indexes and labels.

    Returns a prediction with error bars for a test set of indexes and labels. (Index, Actual Value, Prediction, Lower Bar, Higher Bar)

    Definition Classes
    ContinuousProcessModel
  48. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  49. lazy val trainingData: Seq[I]

    Permalink
    Attributes
    protected
  50. lazy val trainingDataLabels: PartitionedVector

    Permalink
    Attributes
    protected
  51. def unpersist(): Unit

    Permalink

    Forget the cached kernel & noise matrices.

  52. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from GloballyOptWithGrad

Inherited from GloballyOptimizable

Inherited from SecondOrderProcessModel[T, I, Double, Double, DenseMatrix[Double], MultGaussianPRV]

Inherited from ContinuousProcessModel[T, I, Double, MultGaussianPRV]

Inherited from StochasticProcessModel[T, I, Double, MultGaussianPRV]

Inherited from Model[T, I, Double]

Inherited from AnyRef

Inherited from Any

Ungrouped