Skip to contents

\(e(n) = x(n) - w^T r(n)\) and \(\widehat\nabla e^2(n) = -2 e(n) r(n)\). The gradient of the INSTANTANEOUS squared error needs no expectation – that is Widrow-Hoff's simplification and why LMS converges only in the mean. Mirrors morie.fn.rng156 and rng159.

Usage

morie_lms_error(x, w, r)

Arguments

x

numeric primary input.

w

tap weights.

r

matrix of reference vectors (rows = time).

Value

list: error, mse, gradient.

References

Rangayyan (2015), Ch. 3.

Examples

set.seed(1)
morie_lms_error(rnorm(20), c(0.5, -0.2), matrix(rnorm(40), ncol = 2))$mse
#> [1] 1.332801