-
Notifications
You must be signed in to change notification settings - Fork 7
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
A better fitting interface #22
Comments
Maybe add a callable accessor named |
Add a `Dataset.modelfit` and `DataArray.modelfit` accessor with similar syntax and output as `Dataset.curvefit`. Closes #22
An initial version of a callable accessor based on It is very versatile but not as easy to use as I thought. Returns the best fit coeffs, their stderr, and goodness of fit statistics. I tried to make it return the covariance matrix and the number of variables and the initial parameters, but this is difficult since they may differ for each fit. One idea is to write them in terms of params, and leave the unrelated variables as NaN... should see how ambiguous this is to the user. On the other hand, it should be feasible to store the y-values, try to implement that. Maybe |
Add a `Dataset.modelfit` and `DataArray.modelfit` accessor with similar syntax and output as `Dataset.curvefit`. Closes #22
Should close with 0f7a1e0. |
Added new interface for fitting, see #22 for discussions. Made loader argument optional for `erlab.io.loader_context` so it can be used to just change the data directory. Momentum conversion has been rewritten using `xarray.apply_ufunc`, and is now dask-compatible. It also automatically determines the current energy axis (kinetic or binding).
We removed guess_fit since fitting is not magic, and users should be aware of what the initial parameters are. “Explicit is better than implicit.”
Arguably, this introduces a little bit of inconvenience to the fitting workflow since we need to specify independent vars.
Another shortcoming is that the PyARPES approach of creating Xarray objects containing ModelResults has its advantages, but placing non-picklable objects into NetCDF-like structures is counterintuitive and could be misleading, but I can’t think of a better alternative…
The text was updated successfully, but these errors were encountered: