NormalGammaPrior._initial_scales#
- NormalGammaPrior._initial_scales(context, reference)[source]#
Minnesota-tightness local variances; the rate that implies them.
Every \(\psi_{ij}\) starts at \(0.04\), the square of the Minnesota default tightness \(\lambda_1 = 0.2\), so the first coefficient draw is under the standardized Minnesota prior, and the rate starts at \(\lambda / 0.04\), the value whose Gamma has that as its prior mean, so the first rate draw is not fighting the starting variances.
- Parameters:
- Return type:
- Returns:
{"psi"}of shape(k * p, k)and{"rate"}of shape(1,).- Raises:
SpecificationError – If a hyperparameter is out of range.
Example
>>> import numpy as np >>> from cultivars.bayes.priors import PriorContext >>> ctx = PriorContext( ... k_endog=2, order=1, scales=np.ones(2), presample_mean=np.zeros(2) ... ) >>> prior = NormalGammaPrior() >>> state = prior._initial_scales(ctx, prior._unit_ratio(ctx)) >>> state["psi"] array([[0.04, 0.04], [0.04, 0.04]]) >>> state["rate"] array([2.5])