ichor.core.models.mean package

Submodules

ichor.core.models.mean.constant module

class ConstantMean(value: float)

Bases: Mean

A constant value that is used for the mean function. When no training data is present close to test points, covariance is low, therefore the predictions for the test points will be this constant mean value.

Parameters:

value – A float to be used as the constant mean value

value(x: ndarray) ndarray

Returns the constant mean value.

write_str() str

Used to write the mean part of a model file

ichor.core.models.mean.linear module

class LinearMean(beta: ndarray, xmin: ndarray, ymin: float)

Bases: Mean

A linear mean.

value(x: ndarray) ndarray

Returns the constant mean value.

write_str() str

Used to write the mean part of a model file

ichor.core.models.mean.mean module

class Mean

Bases: ABC

Abstract base class for implementing different mean functions for a Gaussian Process.

abstract value(x: ndarray) ndarray
abstract write_str() str

Used to write the mean part of a model file

ichor.core.models.mean.quadratic module

class QuadraticMean(beta: ndarray, xmin: ndarray, ymin: float)

Bases: Mean

A quadratic mean

value(x: ndarray) ndarray

Returns the constant mean value.

write_str() str

Used to write the mean part of a model file

ichor.core.models.mean.zero module

class ZeroMean

Bases: Mean

Implements a zero mean for the Gaussian Process. When covariance between training points and a test point is low, this means the GP will return the mean of the GP (in this case it is set to 0).

value(x: ndarray) ndarray

Return 0 as this is a Zero Mean Gaussian Process

write_str() str

Used to write the mean part of a model file

Module contents

class ConstantMean(value: float)

Bases: Mean

A constant value that is used for the mean function. When no training data is present close to test points, covariance is low, therefore the predictions for the test points will be this constant mean value.

Parameters:

value – A float to be used as the constant mean value

value(x: ndarray) ndarray

Returns the constant mean value.

write_str() str

Used to write the mean part of a model file

class LinearMean(beta: ndarray, xmin: ndarray, ymin: float)

Bases: Mean

A linear mean.

value(x: ndarray) ndarray

Returns the constant mean value.

write_str() str

Used to write the mean part of a model file

class Mean

Bases: ABC

Abstract base class for implementing different mean functions for a Gaussian Process.

abstract value(x: ndarray) ndarray
abstract write_str() str

Used to write the mean part of a model file

class QuadraticMean(beta: ndarray, xmin: ndarray, ymin: float)

Bases: Mean

A quadratic mean

value(x: ndarray) ndarray

Returns the constant mean value.

write_str() str

Used to write the mean part of a model file

class ZeroMean

Bases: Mean

Implements a zero mean for the Gaussian Process. When covariance between training points and a test point is low, this means the GP will return the mean of the GP (in this case it is set to 0).

value(x: ndarray) ndarray

Return 0 as this is a Zero Mean Gaussian Process

write_str() str

Used to write the mean part of a model file