rc.gpr.base§

Basic facilities for GPR Models.

Classes§

Variance

A (Co)Variance Matrix, efficiently represented.

Module Contents§

class Variance(sd, SDfloor=0, corr=None)§

Bases: rc.base.models.tc.nn.Module

Inheritance diagram of rc.gpr.base.Variance

A (Co)Variance Matrix, efficiently represented.

Parameters:
  • sd (TC.BatchVector)

  • SDfloor (float)

  • corr (TC.BatchVector | None)

forward(is_cho=True)[source]§

Alias for self.__call__(). Do not call.

Parameters:

is_cho (bool) – False to return the variance, True to return its Cholesky lower triangle.

Return type:

TC.BatchMatrix | TC.BatchVector

Returns: tc.cholesky(variance) if is_cho else variance.

In either case the result is shaped (…,L,L), or (…,L,1) if diagonal (not covariant).

classmethod create(variance, SDfloor=0)[source]§

Create a Variance object from a diagonal (…,L,1) CoVector or square (…,L,L) Matrix.

Parameters:
  • variance (TC.BatchMatrix | TC.BatchCoVector) – The (co)variance matrix to be stored. If a BatchedCovector is supplied, this represents a diagonal variance matrix of dimension variance.shape[-2].

  • SDfloor (float) – The lower bound applicable to the Standard Deviation.

Return type:

rc.base.models.Self

Returns: The Variance object efficiently representing variance.