eqdisco.optimize.lstsq#
- eqdisco.optimize.lstsq(Phi, y, ridge=0.0, intercept=True, sample_weight=None)[source]#
Least-squares weights of a linear-in-parameters model.
Solves \(\min_{w_0,\mathbf{w}}\lVert \mathbf{y}-w_0-\boldsymbol\Phi\mathbf{w}\rVert^2 + \lambda\lVert\mathbf{w}\rVert^2\) with
ridge\(=\lambda\) (the intercept is not penalized). Returns(w0, w).