MinnesotaPrior._check#

MinnesotaPrior._check()[source]#

Reject hyperparameters that do not describe a prior.

The dataclass is frozen and validates nothing at construction, so every public method calls this first; a prior built with a bad value fails at the fit that first reads it, with the field named.

Raises:

SpecificationError – If tightness, cross_equation, or exogenous is not positive, if decay is negative, or if sum_of_coefficients is given and not positive.

Example

>>> MinnesotaPrior(decay=-1.0)._check()
Traceback (most recent call last):
    ...
cultivars.exceptions.SpecificationError: decay must be non-negative; got -1.0.
Return type:

None