pyacs.lib.glinalg.lsw

Solve weighted least-squares with data standard deviations.

pyacs.lib.glinalg.lsw.lsw(G, d, std)[source]

Solve weighted least-squares with data standard deviations.

Parameters:
  • G (numpy.ndarray) – m x n design matrix.

  • d (numpy.ndarray) – m observation vector.

  • std (array_like) – Standard deviations for d (length m).

Returns:

Solution vector.

Return type:

numpy.ndarray

Notes

System is normalized so that G <- (G.T/std).T, d <- d/std, then solved by ordinary LS.