gp

package
v0.0.0-...-14a59ba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commands

func Commands() []cli.Command

func CovMatrix

func CovMatrix(X []*core.RealSample, cov_func CovFunc) *core.Matrix

func CovVector

func CovVector(X []*core.RealSample, y *core.RealSample, cov_func CovFunc) *core.Vector

Types

type CovFunc

type CovFunc func(*core.Vector, *core.Vector) float64

type CovSEARD

type CovSEARD struct {
	Radiuses *core.Vector // dim -> radius
	Amp      float64
}

Squared error covariance function ARD = auto relevance detection, and here indicates there is a scaling/radius factor per dimension

func (*CovSEARD) Cov

func (cov_func *CovSEARD) Cov(x1 *core.Vector, x2 *core.Vector) float64

func (*CovSEARD) Init

func (cov_func *CovSEARD) Init(radiuses *core.Vector, amp float64)

type GaussianProcess

type GaussianProcess struct {
	Params            GaussianProcessParameters
	CovarianceFunc    CovFunc
	CovMatrix         *core.Matrix
	TargetValues      *core.Vector
	InvCovTarget      *core.Vector // inv(CovMatrix)*TargetValues
	DataSet           *core.RealDataSet
	TrainingDataCount int64
}

func (*GaussianProcess) ApproximateInversion

func (algo *GaussianProcess) ApproximateInversion(A *core.Matrix, u *core.Vector, theta float64, dim int64) *core.Vector

Given matrix m and vector v, compute inv(m)*v. Based on Gibbs and MacKay 1997, and Mark N. Gibbs's PhD dissertation

Details: A - positive seminidefinite matrix u - a vector theta - positive number C = A + I*theta Returns inv(C)*u - So you need the diagonal noise term for covariance matrix in a sense. However, this algorithm is numerically stable, the noise term can be very small and the inversion can still be calculated...

func (*GaussianProcess) Clear

func (algo *GaussianProcess) Clear()

func (*GaussianProcess) Command

func (self *GaussianProcess) Command() cli.Command

func (*GaussianProcess) ExtractTargetValuesAsVector

func (algo *GaussianProcess) ExtractTargetValuesAsVector(samples []*core.RealSample) *core.Vector

func (*GaussianProcess) Init

func (algo *GaussianProcess) Init(ctx *cli.Context)

func (*GaussianProcess) LoadModel

func (self *GaussianProcess) LoadModel(path string)

func (*GaussianProcess) Predict

func (algo *GaussianProcess) Predict(sample *core.RealSample) float64

func (*GaussianProcess) PredictStd

func (algo *GaussianProcess) PredictStd(sample *core.RealSample) float64

func (*GaussianProcess) SaveModel

func (self *GaussianProcess) SaveModel(path string)

func (*GaussianProcess) Train

func (algo *GaussianProcess) Train(dataset *core.RealDataSet)

type GaussianProcessParameters

type GaussianProcessParameters struct {
	Dim   int64
	Theta float64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL