jax_privacy.matrix_factorization.toeplitz.solve_banded
- jax_privacy.matrix_factorization.toeplitz.solve_banded(coef, rhs)[source]
Solve the linear system T_{coef} x = rhs for x for Toeplitz matrix T.
Specifically, T_{coef} is a lower triangular banded Toeplitz matrix.
Note we want to be able to back-propagate gradients through this function, hence we cannot use scipy.linalg.solve_toeplitz.
Example: coef = [a, b, c], rhs = [1, 1, 1, 1, 1, 1], we solve the following system for x
` [a 0 0 0 0 0] [x_0] [1] [b a 0 0 0 0] [x_1] [1] [c b a 0 0 0] [x_2] = [1] [0 c b a 0 0] [x_3] [1] [0 0 c b a 0] [x_4] [1] [0 0 0 c b a] [x_5] [1] `- Parameters:
coef (
Array) – The nonzero coefficients of a lower-triangular Toeplitz matrix C, that is, coef are the leading nonzero entries of C[:, 0]. C is of size n x n where n = len(rhs) (see below); if len(coef) < n, the remaining coefficients are assumed to be zero. If len(coef) > n, then only the first n coefficients are used.rhs (
Array) – The right hand side vector, of length n.
- Return type:
Array- Returns:
The solution to the linear system Toeplitz(coef, n) x = rhs.