solve_observation¶
- sofia_redux.toolkit.splines.spline_utils.solve_observation(amat, beta, n_coefficients, bandwidth, eps)[source]¶
Solve a row-echelon reduced linear system of equations Ax=B.
Returns the results of
back_substitute()
if A is full rank, or the results ofsolve_rank_deficiency()
otherwise.- Parameters:
- amatnumpy.ndarray (float)
The array A in row-echelon form. Should be of shape (>=n_coefficients, >=bandwidth).
- betanumpy.ndarray (float)
The array B accounting for row-echelon form. Should be of shape (>=n_coefficients,).
- n_coefficientsint
The number of coefficients to solve for.
- bandwidthint
The bandwidth of the observation matrix A (
amat
).- epsfloat
The precision to determine singular values of A. If any row of amat[:,0] < (eps * max(amat[:,0])) it will be considered singular.
- Returns:
- coefficients, rank, ssrnumpy.ndarray (float), int, float
The derived coefficients, the rank of A, and the sum of the squared residuals.