EyeCov¶
- class glimix_core.cov.EyeCov(dim)[source]¶
Identity covariance function, K = s·I.
The parameter s is the scale of the matrix.
Example
>>> from glimix_core.cov import EyeCov >>> >>> cov = EyeCov(2) >>> cov.scale = 2.5 >>> print(cov.value()) [[2.5 0. ] [0. 2.5]] >>> g = cov.gradient() >>> print(g['logscale']) [[2.5 0. ] [0. 2.5]] >>> cov.name = "I" >>> print(cov) EyeCov(dim=2): I scale: 2.5
- Parameters
dim (int) – Matrix dimension, d.
Methods
__init__
(dim)Constructor.
gradient
()Derivative of the covariance matrix over log(s), s⋅I.
value
()Covariance matrix.
Attributes
dim
Dimension of the matrix, d.
name
Name of this function.
scale
Scale parameter.