likelihood

Protocol definition for Bayesian likelihood models.

class pysatl_cpd.algorithms.online.bayesian.protocol.likelihood.ILikelihood(*args, **kwargs)[source]

Bases: Protocol

Interface for Bayesian predictive likelihood models.

predict(observation, window=None)[source]

Return predictive log-probabilities for prior and posterior states.

Parameters:
  • observation (double) – New observation to evaluate.

  • window (int | None) – Maximum number of posterior states to consider.

Returns:

Array of log-probabilities: first element is the prior, remaining are posterior states.

Return type:

GenericAlias[double]

update(observation)[source]

Update internal posterior state with a new observation.

Parameters:

observation (double) – Observation to incorporate into the posterior.

Return type:

None

clear()[source]

Reset the likelihood state to its prior.

Return type:

None

__init__(*args, **kwargs)