Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use weights parameter #158

Closed
isentropic opened this issue Jun 10, 2020 · 2 comments
Closed

How to use weights parameter #158

isentropic opened this issue Jun 10, 2020 · 2 comments

Comments

@isentropic
Copy link

I'm sort of confused with the norms after seeing multiple issues.
And it is not exactly clear from documentation:

If I have points with x and y with standard errors delta_y (standard deviations)
Should I
curvefit(f, x, y, 1/delta_y^2) or curvefit(f, x, y, 1/delta_y)

This confused me so many times and I wish this simple example would be included in the docs

@Magalame
Copy link
Contributor

From the readme, w is the inverse covariance matrix. So if delta_y is the standard derviation, i.e. the square root of the covariance matrix (or vector in this case), you want 1/delta^2

@pkofod
Copy link
Member

pkofod commented Sep 3, 2022

It is actually explained in the docs but they've not been generated for a long time. They will be updated when I tag a new version. https://julianlsolvers.github.io/LsqFit.jl/dev/tutorial/#Weighted-Least-Squares

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants