KappaFilter#
- class braintrace.KappaFilter(init_value, kappa)#
Low-pass filter helper state.
EPropno longer uses this class directly — it filters the eligibility trace internally instead.KappaFilterremains public and available for user-side filtering of an output-side (or any other) signal outside the algorithm’s own hooks.The filter smooths the signal following \(x_{\mathrm{filt}} \leftarrow (1-\kappa) \cdot x + \kappa \cdot x_{\mathrm{filt}}\).
- Parameters:
- Raises:
ValueError – If
kappais not inside the half-open interval[0, 1).
Examples
>>> import jax.numpy as jnp >>> import braintrace >>> filt = braintrace.KappaFilter(jnp.zeros(3), kappa=0.5) >>> out = filt.update(jnp.ones(3)) >>> print(out) [0.5 0.5 0.5] >>> out = filt.update(jnp.ones(3)) >>> print(out) [0.75 0.75 0.75]