Least Mean Squares¶
Least Mean Squares Family¶
Implementations of adaptive filters from the LMS class. These algorithms have a low complexity and reliable behavior with a somewhat slower convergence.
- class pyroomacoustics.adaptive.lms.BlockLMS(length, mu=0.01, L=1, nlms=False)¶
Bases:
NLMS
Implementation of the least mean squares algorithm (NLMS) in its block form
- Parameters
length (int) – the length of the filter
mu (float, optional) – the step size (default 0.01)
L (int, optional) – block size (default is 1)
nlms (bool, optional) – whether or not to normalize as in NLMS (default is False)
- reset()¶
Reset the state of the adaptive filter
- update(x_n, d_n)¶
Updates the adaptive filter with a new sample
- Parameters
x_n (float) – the new input sample
d_n (float) – the new noisy reference signal
- class pyroomacoustics.adaptive.lms.NLMS(length, mu=0.5)¶
Bases:
AdaptiveFilter
Implementation of the normalized least mean squares algorithm (NLMS)
- Parameters
length (int) – the length of the filter
mu (float, optional) – the step size (default 0.5)
- update(x_n, d_n)¶
Updates the adaptive filter with a new sample
- Parameters
x_n (float) – the new input sample
d_n (float) – the new noisy reference signal