Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volterra svf returns error signal #5

Open
jeyojey opened this issue Dec 21, 2023 · 0 comments
Open

Volterra svf returns error signal #5

jeyojey opened this issue Dec 21, 2023 · 0 comments

Comments

@jeyojey
Copy link

jeyojey commented Dec 21, 2023

Why does your Volterra return the error signal instead of a filtered one?

def svf(x, d, M=128, L=10, mu1=0.2, mu2=0.2): nIters = min(len(x),len(d)) - M L2=int(L*(L+1)/2) u = np.zeros(M) u2 = np.zeros((M,L2)) w = np.zeros(M) h2 = np.zeros(L2) e = np.zeros(nIters) for n in range(nIters): u[1:] = u[:-1] u[0] = x[n] u2_n = np.outer(u[:L],u[:L]) u2_n = u2_n[np.triu_indices_from(u2_n)] u2[1:] = u2[:-1] u2[0] = u2_n x2 = np.dot(u2,h2) g = u + x2 y = np.dot(w, g.T) e_n = d[n] - y w = w + mu1*e_n*g/(np.dot(g,g)+1e-3) grad_2 = np.dot(u2.T,w) h2 = h2 + mu2*e_n*grad_2/(np.dot(grad_2,grad_2)+1e-3) e[n] = e_n return e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant