[SciPy-User] least square fit with weight in linalg.lstsq
Tue Dec 7 14:51:52 CST 2010
On Tue, Dec 7, 2010 at 2:33 PM, Charles R Harris
> On Tue, Dec 7, 2010 at 12:25 PM, Xunchen Liu <firstname.lastname@example.org> wrote:
>> I don't know if there is option to have weighting in least square fit?
>> attached is the code I use linalg.lstsq to fit 4 parameters out of 6
>> Also, how can I read the uncertainty of each parameters fitted?
> There is no option for weights at the moment, nor for the covariance of the
> fitted parameters. We should fix that up someday, but at the moment you need
> to write your own implementation.
In writing your own implementation, you could use optimize curve_fit
as a pattern for the weight handling.
Or you just use scikits.statsmodels.WLS
> SciPy-User mailing list
More information about the SciPy-User