aspcore.matrices.lsq_with_l2_regularization
- aspcore.matrices.lsq_with_l2_regularization(A, y, lamb=1e-10)
Solves a linear least squares problem with L2 regularization
Uses the SVD to solve the problem, which is not necessarily the most efficient
- Parameters:
A (ndarray of shape (m, n)) – matrix in the least squares problem
y (ndarray of shape (m)) – vector in the least squares problem
- Returns:
x – solution to the least squares problem
- Return type:
ndarray of shape (n)