Observation scoring¶
observation_scoring(False) omits declared observation likelihoods and
compiler-generated marginal likelihood factors during execution. Latent priors,
their support constraints, and authored score potentials retain their scores.
The policy avoids evaluating the omitted density, including an inactive response
law whose parameters would be invalid for the recorded outcome.
The policy changes scoring only. Recorded values, raw pointwise likelihood accessors, and the response-generating distribution retain their usual meaning. Handlers compose by scope, with the innermost policy taking precedence, and leaving a scope restores the enclosing policy even after an exception.
observation_scoring
¶
Select likelihood scoring without changing priors, observations, or sampling.
ObservationScoringHandler
¶
Bases: EffectHandler
Choose whether declared observations and likelihood factors contribute.
Latent draws and explicit score potentials retain their ordinary scores. Recorded values and raw likelihoods are unchanged; disabling likelihood scoring avoids evaluating that likelihood at all.
| PARAMETER | DESCRIPTION |
|---|---|
enabled
|
Include likelihood scores when true; omit them when false.
TYPE:
|
Source code in src/quivers/effects/observation_scoring.py
install
¶
install(run: RunContext) -> tuple[Installation, ...]
Set this execution's policy, with innermost scopes taking precedence.
| PARAMETER | DESCRIPTION |
|---|---|
run
|
Isolated per-run state, shared by its native host steps.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
tuple[Installation, ...]
|
No effect is replaced; existing host boundaries read the policy. |
Source code in src/quivers/effects/observation_scoring.py
observation_scoring
¶
observation_scoring(enabled: bool = True) -> ObservationScoringHandler
Create a scoped likelihood policy shared by fitting interfaces.
| PARAMETER | DESCRIPTION |
|---|---|
enabled
|
Whether observations and classified likelihood factors are scored.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ObservationScoringHandler
|
A reusable context manager; latent priors and score potentials remain. |