-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
ENH: Option to return covariance matrix of fitted coeffecients for polynomial fitters #7880
Conversation
…ents for the fitters in the polynomial module. Implementation is the same as numpy.polyfit. See issue numpy#7780.
This would be really helpful for us moving from What's the status here? |
@@ -805,6 +817,9 @@ class domain in NumPy 1.4 and ``None`` in later versions. | |||
if full: | |||
[coef, status] = res | |||
return cls(coef, domain=domain, window=window), status | |||
elif cov: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is cov and full mutually exclusive? Shouldn't it be something like if full and not cov
, elif cov and not full
....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it is a little ambiguous. I was just copying the style of polyfit
to keep it consistent: https://github.com/numpy/numpy/blob/d9b1e32cb8ef90d6b4a47853241db2a28146a57d/numpy/lib/polynomial.py#L639-L6419
Implementing changes from numpy#7880
We discussed this at a recent triage meeting and the general opinion was to add a function |
The changes should be mostly be in
Docstrings need Maybe we should add a slot for the covariance in the polynomial base class? That would allow transformation of domain and polynomial basis types to track it. The default value would be Note that number of degrees of freedom used to estimate the measurement variance can become uncertain, depending on how the weights are used and whether some variables are lost due to the condition number. |
I am going to close this since it has been inactive for nearly two years. It still would be nice to get a |
This is for fitters in the polynomial module.
Implementation is the same as numpy.polyfit.
See issue #7780. Was sent round the mailing list last week - no complaints.