| Constant | Value | |
|---|---|---|
| 0 | CALIBRATED_BIAS_LAMBDA | 0.5 |
| 1 | CALIBRATED_INTERVAL_DF | 1.56 |
| 2 | CALIBRATED_INTERVAL_LOC_INTERCEPT | 0.084 |
| 3 | CALIBRATED_INTERVAL_LOC_SLOPE | 0.34 |
| 4 | CALIBRATED_INTERVAL_SCALE_INTERCEPT | 0.254 |
| 5 | CALIBRATED_INTERVAL_SCALE_SLOPE | 1.512 |
Bayesian settings
Shipped values, interval calibration, overrides and versioning
BayesianSettings holds every argument that changes the posterior. Symbols follow the notation page; the posterior contract gives the equations each setting enters.
Shipped values
The table shows the shipped BAYESIAN_DEFAULTS object used when no settings are supplied to BayesianPosterior. It is a compatibility configuration, not the recommended research preset. Presets lists named profiles.
| Setting | Symbol | Shipped value | Meaning |
|---|---|---|---|
minimum_observations |
\(n_j\) | 3 |
Minimum growth and error observations |
include_model |
\(x_M\) | True |
Include the model reading |
dispersion_weighted |
\(d\) | False |
Try analyst dispersion before historical errors |
consensus_stdev_variance_multiplier |
\(\kappa\) | 1.0 |
Scale dispersion variance |
consensus_count_exponent |
\(\alpha\) | None |
Scale dispersion precision by analyst count |
consensus_bias_lambda |
\(\lambda\) | 0.0 |
Fraction of estimated consensus bias removed |
consensus_bias_process_noise |
\(Q\) | 1.0 |
Kalman process variance |
consensus_bias_measurement_noise |
\(R\) | 0.5 |
Kalman measurement variance |
winsorize_fraction |
None |
Historical tail fraction to clip | |
interval_width |
\(p\) | 0.9 |
Nominal interval coverage |
interval_df |
\(\nu\) | 1.5 |
Student-t degrees of freedom |
interval_loc |
\(\ell\) | 0.5 |
Student-t location |
interval_scale |
\(\omega\) | 2.75 |
Student-t scale |
preset |
None |
Originating preset | |
fitted_through |
None |
Calibration training cutoff, if known | |
version |
bayesian-defaults |
Configuration identity |
Interval calibration
The interval turns the posterior spread \(\sigma_\theta\) into growth bounds \(\theta_L=\hat\theta+\sigma_\theta q_L\) and \(\theta_U=\hat\theta+\sigma_\theta q_U\), where \(q_L\) and \(q_U\) are quantiles of a Student-t with shape \((\nu,\ell,\omega)\) at coverage \(p\).
- Explicit shape: Plain
BayesianSettings(version=...)is not sufficient. Supply all three shape fields \(\nu\), \(\ell\) and \(\omega\), or take settings from a preset. - Calibrated profile: Omitted shape fields can be resolved when dispersion weighting is enabled and \(\lambda\) equals the calibrated strength. The calibration depends on the variance multiplier \(\kappa\).
- Other profiles: Supply explicit
interval_df,interval_locandinterval_scale. - Provenance: Resolved values appear in
model_dump(). A missing calibration date is not evidence that the interval was chosen without fitting. - Coverage: A shape fitted for one profile need not be calibrated for another. Nominal coverage \(p\) must be checked on the intended application data.
Calibration constants, read from the installed package:
See training provenance before using a research preset in historical evaluation.
Overriding settings
Show the code
narrow = pf.posterior_preset(
"plain-2026-09", version="plain-narrow-v1", interval_width=0.8,
)
narrow.model_dump(include={"version", "interval_width", "interval_df", "interval_loc", "interval_scale"}){'interval_width': 0.8,
'interval_df': 2.84,
'interval_loc': 0.17,
'interval_scale': 0.835,
'version': 'plain-narrow-v1'}
- Version: Changing a posterior preset’s calculation requires a new version.
- Validation: Use the constructor or
model_validateto validate a payload. Unknown fields fail rather than being silently ignored. - Profile change: Changing dispersion weighting, \(\lambda\) or \(\kappa\) discards the inherited interval shape and fitted-through date. A supported calibration may replace them; otherwise an explicit shape is required.
- Preparation: Rebuild subject statistics under the changed settings.
- Persistence: Load JSON or TOML in the calling application, then pass the payload to
BayesianSettings.model_validate. The library performs no file I/O.
Numerical guard
The variance floor \(\varepsilon\) prevents a zero variance from producing infinite precision, \(\tau_j=1/\max(\sigma_j^2,\varepsilon)\). It is an implementation guard, not a calibration option: 0.000000000001.
Renamed constants
- BAYESIAN_DEFAULTS: Replaces
DSL_DEFAULTSfor new code. - Compatibility: The old name warns but preserves its object and version for replay.
The panel workflow reference covers its separate settings class.