BayesianPosterior

BayesianPosterior(
    forecast_source,
    settings=BAYESIAN_DEFAULTS,
    consensus_source=CONSENSUS_SOURCE,
)

Prior, model and consensus, blended by their own precision.

Stateless rather than fitted: every precision is computed per subject from that subject’s own point-in-time history, which history supplies as columns on the frame. Nothing is learned across subjects, so fit has nothing to do but verify the frame and hand back a fitted object; the per-subject arithmetic lives entirely in apply.

Attributes

Name Type Description
forecast_source str The source blended alongside consensus.
settings BayesianSettings The arguments to apply under.
consensus_source str The source treated as consensus.

Methods

Name Description
fit Verify the sources this method needs are present, and learn nothing.

fit

fit(subjects)

Verify the sources this method needs are present, and learn nothing.

Parameters

Name Type Description Default
subjects pd.DataFrame Training rows, read only to check that the sources this method needs are present. required

Returns

Name Type Description
FittedBayesianPosterior The fitted method, carrying the settings it was constructed with.

Raises

Name Type Description
PanelError A source this method reads is absent from the frame.