SpikeAndSlabPrior._check#

SpikeAndSlabPrior._check()[source]#

Reject widths and probabilities that do not describe a prior.

Called from _initial_scales(), so the error surfaces at fit rather than at construction, matching the Minnesota family.

Raises:

SpecificationError – If the widths are not ordered and positive, the inclusion probability is not interior, or the deterministic scale is not positive.

Example

>>> SpikeAndSlabPrior(spike=1.0, slab=0.5)._check()
Traceback (most recent call last):
    ...
cultivars.exceptions.SpecificationError: spike and slab must satisfy 0 < spike < ...
>>> SpikeAndSlabPrior(inclusion=1.0)._check()
Traceback (most recent call last):
    ...
cultivars.exceptions.SpecificationError: inclusion must be strictly between 0 and 1; ...
Return type:

None