Bayesian_Filter
def Bayesian_Filter(
category_sizes:list[int], # Number of states per sensory category.
sensory_predictions:NDArray[numpy.float64], # Each row is a hypothesis; columns grouped by category_sizes, each group sums to 1.
transition_predictions:NDArray[numpy.float64], # Each row is a hypothesis; columns give predicted probabilities for each hypothesis being true at the next step.
belief_prior:NDArray[numpy.float64]=None, # Initial belief prior. If None, set to uniform.
log_base:float=2.0, # Base for logarithms and exponentials.
data_record:list[str]=[], # List of internal variable names to record each time step. Accepts "all".
record_until:int=-1, # Number of time steps to record. Default -1 disables recording.
):Bayesian Filter for recursive state estimation.
Each state/hypothesis posits: 1. A probability for all states of K sensory categories (with discrete state spaces). 2. A probability that each state/hypothesis will be true when the sensory category states are next updated.
The filter maintains a belief state over these hypotheses/states, assuming they are exhaustive and mutually exclusive.












