aspcore.matrices_jax.regularize_matrix_with_condition_number
- aspcore.matrices_jax.regularize_matrix_with_condition_number(mat, max_cond=10000000000.0)
Adds a scaled identity matrix to the matrix in order to ensure a maximum condition number
- Parameters:
mat (ndarray of shape (a, a)) – Matrix to be regularized
max_cond (float, optional) – maximum condition number allowed. Must be positive. The default is 1e10.
- Returns:
mat_reg – Regularized matrix
- Return type:
ndarray of shape (a, a)