GivenCov

class glimix_core.cov.GivenCov(K0)[source]

Given covariance function, K = s⋅K₀.

The covariance matrix is the provided matrix K₀ scaled by s: K = s⋅K₀.

Example

>>> from glimix_core.cov import GivenCov
>>> from numpy import dot
>>> from numpy.random import RandomState
>>>
>>> G = RandomState(0).randn(5, 3)
>>> K0 = dot(G, G.T)
>>> cov = GivenCov(K0)
>>> cov.scale = 1.3
>>> cov.name = "K"
>>> print(cov)
GivenCov(K0=...): K
  scale: 1.3
__init__(K0)[source]

Constructor.

Parameters

K0 (array_like) – A semi-definite positive matrix.

Methods

__init__(K0)

Constructor.

gradient()

Derivative of the covariance matrix over log(s).

value()

Covariance matrix, s⋅K₀.

Attributes

name

Name of this function.

scale

Scale parameter, s.