univariate_gaussian_conjugate
Univariate Gaussian conjugate Bayesian online change-point detection.
- class pysatl_cpd.algorithms.online.bayesian.algorithm.univariate_gaussian_conjugate.UnivariateGaussianConjugateBOCPDConfiguration(*, learning_period_size=0, window=None, cpf_type=BayesianCPFType.MAX_RUN_LENGTH, hazard_lambda=10.0, prior_mu=0.0, prior_k=1.0, prior_alpha=1.0, prior_beta=1.0)[source]
Bases:
BayesianOnlineCPDConfigurationConfiguration for the univariate Gaussian conjugate BOCPD algorithm.
- Parameters:
- __post_init__()[source]
Validate configuration fields after initialisation.
Extends parent validation with hazard and prior checks.
- Raises:
ValueError – If hazard_lambda < 1.0 or any prior scale parameter is non-positive.
- Return type:
- __init__(*, learning_period_size=0, window=None, cpf_type=BayesianCPFType.MAX_RUN_LENGTH, hazard_lambda=10.0, prior_mu=0.0, prior_k=1.0, prior_alpha=1.0, prior_beta=1.0)
- class pysatl_cpd.algorithms.online.bayesian.algorithm.univariate_gaussian_conjugate.UnivariateGaussianConjugateBOCPDState(*, is_in_learning_period=False, t=0, run_length_log_posterior=<factory>, mu_params=<factory>, k_params=<factory>, alpha_params=<factory>, beta_params=<factory>)[source]
Bases:
BayesianOnlineCPDStateState for the univariate Gaussian conjugate BOCPD algorithm.
- Variables:
mu_params – Posterior mean parameters per run length.
k_params – Posterior pseudo-count parameters per run length.
alpha_params – Posterior shape parameters per run length.
beta_params – Posterior scale parameters per run length.
- Parameters:
- __init__(*, is_in_learning_period=False, t=0, run_length_log_posterior=<factory>, mu_params=<factory>, k_params=<factory>, alpha_params=<factory>, beta_params=<factory>)
- class pysatl_cpd.algorithms.online.bayesian.algorithm.univariate_gaussian_conjugate.UnivariateGaussianConjugateBOCPD(learning_period_size=0, hazard_lambda=10.0, prior_mu=0.0, prior_k=1.0, prior_alpha=1.0, prior_beta=1.0, window=None, cpf_type=BayesianCPFType.MAX_RUN_LENGTH)[source]
Bases:
AbstractBayesianUnivariate Gaussian conjugate Bayesian online change-point detector.
Wires a
ConstantHazard,GaussianConjugatelikelihood, and the selected CPF strategy.- Parameters:
learning_period_size (
int) – Number of initial steps where the score is clamped to 0.hazard_lambda (
float) – Expected run length for the constant hazard model (>= 1).prior_mu (
float) – Prior mean for the Normal-Inverse-Gamma conjugate prior.prior_k (
float) – Prior pseudo-count (> 0).prior_alpha (
float) – Prior shape (> 0).prior_beta (
float) – Prior scale (> 0).window (
int|None) – Maximum number of run-length states to retain.cpf_type (
BayesianCPFType) – Change-point function variant (max-run-length or drop).
- __init__(learning_period_size=0, hazard_lambda=10.0, prior_mu=0.0, prior_k=1.0, prior_alpha=1.0, prior_beta=1.0, window=None, cpf_type=BayesianCPFType.MAX_RUN_LENGTH)[source]
- property configuration: UnivariateGaussianConjugateBOCPDConfiguration
Return the concrete configuration type.
- Return type:
- property state: UnivariateGaussianConjugateBOCPDState
Materialise an immutable snapshot including likelihood parameters.
- Return type: