Recursive Least Squares¶
Recursive Least Squares Family¶
Implementations of adaptive filters from the RLS class. These algorithms typically have a higher computational complexity, but a faster convergence.
-
class
pyroomacoustics.adaptive.rls.
BlockRLS
(length, lmbd=0.999, delta=10, dtype=<Mock id='139803631498832'>, L=None)¶ Bases:
pyroomacoustics.adaptive.rls.RLS
Block implementation of the recursive least-squares (RLS) algorithm. The difference with the vanilla implementation is that chunks of the input signals are processed in batch and some savings can be made there.
Parameters: - length (int) – the length of the filter
- lmbd (float, optional) – the exponential forgetting factor (default 0.999)
- delta (float, optional) – the regularization term (default 10)
- dtype (numpy type) – the bit depth of the numpy arrays to use (default np.float32)
- L (int, optional) – the block size (default to length)
-
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.rls.
RLS
(length, lmbd=0.999, delta=10, dtype=<Mock id='139803631498768'>)¶ Bases:
pyroomacoustics.adaptive.adaptive_filter.AdaptiveFilter
Implementation of the exponentially weighted Recursive Least Squares (RLS) adaptive filter algorithm.
Parameters: - length (int) – the length of the filter
- lmbd (float, optional) – the exponential forgetting factor (default 0.999)
- delta (float, optional) – the regularization term (default 10)
- dtype (numpy type) – the bit depth of the numpy arrays to use (default np.float32)
-
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