Class

io.github.mandar2812.dynaml.models.gp

GPNarModel

Related Doc: package gp

Permalink

class GPNarModel extends GPRegression

Linear Supertypes
GPRegression, AbstractGPRegressionModel[Seq[(DenseVector[Double], Double)], DenseVector[Double]], GloballyOptWithGrad, GloballyOptimizable, SecondOrderProcessModel[Seq[(DenseVector[Double], Double)], DenseVector[Double], Double, Double, DenseMatrix[Double], MultGaussianPRV], ContinuousProcessModel[Seq[(DenseVector[Double], Double)], DenseVector[Double], Double, MultGaussianPRV], StochasticProcessModel[Seq[(DenseVector[Double], Double)], DenseVector[Double], Double, MultGaussianPRV], Model[Seq[(DenseVector[Double], Double)], DenseVector[Double], Double], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GPNarModel
  2. GPRegression
  3. AbstractGPRegressionModel
  4. GloballyOptWithGrad
  5. GloballyOptimizable
  6. SecondOrderProcessModel
  7. ContinuousProcessModel
  8. StochasticProcessModel
  9. Model
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GPNarModel(order: Int, cov: LocalScalarKernel[DenseVector[Double]], nL: LocalScalarKernel[DenseVector[Double]], trainingdata: Seq[(DenseVector[Double], Double)], meanFunc: DataPipe[DenseVector[Double], Double] = DataPipe(_ => 0.0))

    Permalink

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
    Definition Classes
    AbstractGPRegressionModel
  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. def _validationSet: Seq[(DenseVector[Double], Double)]

    Permalink

    Accessor method for validationSet

    Accessor method for validationSet

    Definition Classes
    GPRegression
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. var blockSize: Int

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractGPRegressionModel
  11. def blockSize_(b: Int): Unit

    Permalink
    Definition Classes
    AbstractGPRegressionModel
  12. var caching: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractGPRegressionModel
  13. def calculateEnergyPipe(h: Map[String, Double], options: Map[String, String]): DataPipe2[Seq[DenseVector[Double]], 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.

    Definition Classes
    AbstractGPRegressionModel
  14. def calculateGradEnergyPipe(h: Map[String, Double]): DataPipe2[Seq[DenseVector[Double]], 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.

    Definition Classes
    AbstractGPRegressionModel
  15. def clone(): AnyRef

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

    Permalink

    Underlying covariance function of the Gaussian Processes.

    Underlying covariance function of the Gaussian Processes.

    Definition Classes
    AbstractGPRegressionModelSecondOrderProcessModel
  17. 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
  18. def data: Seq[(DenseVector[Double], Double)]

    Permalink
    Definition Classes
    Model
  19. def dataAsIndexSeq(data: Seq[(DenseVector[Double], Double)]): Seq[DenseVector[Double]]

    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
  20. def dataAsSeq(data: Seq[(DenseVector[Double], Double)]): Seq[(DenseVector[Double], 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
    GPRegressionStochasticProcessModel
  21. def energy(h: Map[String, Double], options: Map[String, String]): Double

    Permalink

    Calculates the energy of the configuration, required for global optimization routines.

    Calculates the energy of the configuration, required for global optimization routines.

    Defaults to the base implementation in io.github.mandar2812.dynaml.optimization.GloballyOptimizable in case a validation set is not specified through the validationSet variable.

    h

    The value of the hyper-parameters in the configuration space

    options

    Optional parameters about configuration

    returns

    Configuration Energy E(h)

    Definition Classes
    GPRegressionAbstractGPRegressionModelGloballyOptimizable
  22. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. val g: Seq[(DenseVector[Double], Double)]

    Permalink

    The training data

    The training data

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

    Permalink
    Definition Classes
    AnyRef → Any
  28. def getCrossKernelMatrix[U <: Seq[DenseVector[Double]]](test: U): PartitionedMatrix

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractGPRegressionModel
  29. def getTestKernelMatrix[U <: Seq[DenseVector[Double]]](test: U): PartitionedPSDMatrix

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractGPRegressionModel
  30. def getTrainKernelMatrix[U <: Seq[DenseVector[Double]]]: PartitionedPSDMatrix

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractGPRegressionModel
  31. 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
    GPRegressionAbstractGPRegressionModelGloballyOptWithGrad
  32. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  33. 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
  34. final def isInstanceOf[T0]: Boolean

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

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractGPRegressionModel
  36. val mean: DataPipe[DenseVector[Double], 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
  37. val modelOrder: Int

    Permalink
  38. def modelPredictedOutput(n: Int)(input: DenseVector[Double]): Seq[(Double, Double, Double)]

    Permalink
  39. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  40. val noiseModel: LocalScalarKernel[DenseVector[Double]]

    Permalink
    Definition Classes
    AbstractGPRegressionModel
  41. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  43. val npoints: Int

    Permalink
    Definition Classes
    AbstractGPRegressionModel
  44. var partitionedKernelMatrixCache: PartitionedPSDMatrix

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractGPRegressionModel
  45. 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
  46. def predict(point: DenseVector[Double]): 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
  47. def predictionWithErrorBars[U <: Seq[DenseVector[Double]]](testData: U, sigma: Int): Seq[(DenseVector[Double], 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
  48. def predictiveDistribution[U <: Seq[DenseVector[Double]]](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
  49. def setState(s: Map[String, Double]): GPNarModel.this.type

    Permalink

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

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

    Definition Classes
    AbstractGPRegressionModel
  50. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  51. def test(testData: Seq[(DenseVector[Double], Double)]): Seq[(DenseVector[Double], 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
  52. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  53. lazy val trainingData: Seq[DenseVector[Double]]

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractGPRegressionModel
  54. lazy val trainingDataLabels: PartitionedVector

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractGPRegressionModel
  55. def unpersist(): Unit

    Permalink

    Forget the cached kernel & noise matrices.

    Forget the cached kernel & noise matrices.

    Definition Classes
    AbstractGPRegressionModel
  56. lazy val validationDataFeatures: Seq[DenseVector[Double]]

    Permalink
    Attributes
    protected
    Definition Classes
    GPRegression
  57. lazy val validationDataLabels: PartitionedVector

    Permalink
    Attributes
    protected
    Definition Classes
    GPRegression
  58. var validationSet: Seq[(DenseVector[Double], Double)]

    Permalink

    Setting a validation set is optional in case one wants to calculate joint marginal likelihood of the training and validation data as the objective function for hyper-parameter optimization.

    Setting a validation set is optional in case one wants to calculate joint marginal likelihood of the training and validation data as the objective function for hyper-parameter optimization. While retaining just the training data set for final calculating predictiveDistribution during final deployment.

    Attributes
    protected
    Definition Classes
    GPRegression
  59. def validationSet_(v: Seq[(DenseVector[Double], Double)], append: Boolean = false): Unit

    Permalink

    Set the validation data, optionally append it to the existing validation data

    Set the validation data, optionally append it to the existing validation data

    v

    data

    append

    Defaults to false

    Definition Classes
    GPRegression
  60. final def wait(): Unit

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

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

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

Deprecated Value Members

  1. var processTargets: DataPipe[Stream[(Double, Double)], Stream[(Double, Double)]]

    Permalink

    Assigning a value to the processTargets data pipe can be useful in cases where we need to perform operations such as de-normalizing the predicted and actual targets to their original scales.

    Assigning a value to the processTargets data pipe can be useful in cases where we need to perform operations such as de-normalizing the predicted and actual targets to their original scales.

    Definition Classes
    GPRegression
    Annotations
    @deprecated
    Deprecated

    scheduled to be removed by DynaML 2.x

  2. var scoresToEnergy: DataPipe[Stream[(Double, Double)], Double]

    Permalink

    If one uses a non empty validation set, then the user can set a custom function of the validation predictions and targets as the objective function for the hyper-parameter optimization routine.

    If one uses a non empty validation set, then the user can set a custom function of the validation predictions and targets as the objective function for the hyper-parameter optimization routine.

    Currently this defaults to RMSE calculated on the validation data.

    Definition Classes
    GPRegression
    Annotations
    @deprecated
    Deprecated

    sscheduled to be removed by DynaML 2.x

Inherited from GPRegression

Inherited from AbstractGPRegressionModel[Seq[(DenseVector[Double], Double)], DenseVector[Double]]

Inherited from GloballyOptWithGrad

Inherited from GloballyOptimizable

Inherited from SecondOrderProcessModel[Seq[(DenseVector[Double], Double)], DenseVector[Double], Double, Double, DenseMatrix[Double], MultGaussianPRV]

Inherited from ContinuousProcessModel[Seq[(DenseVector[Double], Double)], DenseVector[Double], Double, MultGaussianPRV]

Inherited from StochasticProcessModel[Seq[(DenseVector[Double], Double)], DenseVector[Double], Double, MultGaussianPRV]

Inherited from Model[Seq[(DenseVector[Double], Double)], DenseVector[Double], Double]

Inherited from AnyRef

Inherited from Any

Ungrouped