lenskit.math.solve#

Efficient solver routines.

Functions

solve_cholesky(A, y)

Solve the system \(A\mathbf{x}=\mathbf{y}\) for \(\mathbf{x}\) with Cholesky decomposition.

lenskit.math.solve.solve_cholesky(A, y)#

Solve the system \(A\mathbf{x}=\mathbf{y}\) for \(\mathbf{x}\) with Cholesky decomposition.

This wraps torch.linalg.cholesky_ex() and torch.cholesky_solve() in an easier-to-use interface with error checking.

Parameters:
  • A (Tensor) – the left-hand matrix \(A\)

  • y (Tensor) – the right-hand vector \(\mathbf{y}\)

Returns:

the solution \(\mathbf{x}\)

Return type:

Tensor