SumCov

class glimix_core.cov.SumCov(covariances)[source]

Sum of covariance functions, K = K₀ + K₁ + ⋯.

Example

>>> from glimix_core.cov import LinearCov, SumCov
>>> from numpy.random import RandomState
>>>
>>> random = RandomState(0)
>>> cov_left = LinearCov(random.randn(4, 20))
>>> cov_right = LinearCov(random.randn(4, 15))
>>> cov_left.scale = 0.5
>>>
>>> cov = SumCov([cov_left, cov_right])
>>> cov_left.name = "A"
>>> cov_right.name = "B"
>>> cov.name = "A+B"
>>> print(cov)
SumCov(covariances=...): A+B
  LinearCov(): A
    scale: 0.5
  LinearCov(): B
    scale: 1.0
__init__(covariances)[source]

Constructor.

Parameters

covariances (list) – List of covariance functions.

Methods

__init__(covariances)

Constructor.

gradient()

Sum of covariance function derivatives.

value()

Sum of covariance matrices.

Attributes

name

Name of this function.