meridian.analysis.review.configs.PriorPosteriorShiftConfig

Configuration for the Prior-Posterior Shift Check.

Inherits From: ChannelCheckConfig, BaseConfig

n_bootstraps Number of bootstrap samples to use for calculating posterior statistics.
alpha Significance level for detecting a shift between prior and posterior distributions.
seed Random seed for reproducibility of bootstrap sampling.
failing_channels_threshold Dataclass field
failing_channels_ratio_threshold Dataclass field

Methods

is_failing_channels_within_threshold

View source

Checks if the number and ratio of failing channels are within threshold.

If both thresholds are specified, the check passes if EITHER condition is satisfied (or both). If no threshold is set, returns True only when n_failing == 0.

Args
n_failing The number of failing channels.
n_total The total number of channels evaluated.

Returns
True if the failing channels are within the tolerance threshold(s), False otherwise.

__eq__

Return self==value.

alpha 0.05
failing_channels_ratio_threshold None
failing_channels_threshold None
n_bootstraps 1000
seed 42