-
Notifications
You must be signed in to change notification settings - Fork 11
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
Interpolator: Use more advanced interpolation methods #686
Comments
TLDR: don't know until we get the data. But could we have a hierarchical model in which beta has a universal value; ratios of trap densities vary slowly over time (as splines?); and the total trap density is y=mt+c within specific ranges of t, but c jumps between them. There are two big uncertainties:
Assuming it will be only piecewise smooth, we still have a choice: we could either look at data +/-n days from the date in question - that's essentially a spline fit, as you sugest. However, we will need to choose n - and whatever we choose, that'll give a bad fit near any discontinuity. I would instead suggest a model with lots of (y=mt+c) models, each within a range t1<t<t2, where t1 and t2 are times of discontinuity events found from an initial nonlinear search, i.e. t2 for one period is the same as t1 for the next period. Is that feasible?
|
I've added a CubicSpline interpolator here: From what RIchard said it sounds like it might make sense to instead use a sliding window around the time we're interested in and only for those attributes which we know vary over time. If the relationship tends to be linear locally then the existing LinearInterpolator may be sufficient. |
Sorry for the delay in getting back to you. Thanks for the CubicSpline. 1). Please could the likelihood calculation use the 2D covariance matrix between measurements, rather than just the sigma on individual measurements?
2). Rather than a sliding window, I would prefer to use a model in which all the data (from a time window) is fitted, but jumps are allowed in certain parameters. Having talked to people from the Gaia mission, I expect most parameters to very smoothly (linear/polynomial/cubicspline), but rho_i parameters to vary linearly (or even be constant) between jumps at discrete times t_1, t_2, t_3,... t_n.
|
The covariance matrix is available here: https://github.com/rhayes777/PyAutoFit/blob/main/autofit/non_linear/samples/pdf.py
Yay. |
After a conversation with James, a sliding time window is definitely not a great idea - we'd use the calibration process many times and end up with lots of fits in overlapping windows. When it came time to use a best-fit parameter, we would be unsure which one to use. Much cleaner to future us if we just generate a single model - the best-fit parameters of which we upate occasionally, but which can always be used in its most recent incarnation. So an ability to fit only data within a time window is great functionality if it already exists, but I imagine that time window will probably always be "forever". |
Could be worth having a call about this if you have time |
Yep, can talk now if you like |
Could you email a zoom link? |
Going to close this for now, as we are not actively working on it, but I am sure CTI will motivate us to come back to this inthe future. |
The interpolator now works for the CTI use case, here is a simple boiled-down example which is a simplified version of (https://github.com/Jammy2211/autocti_workspace_test/blob/main/temporal/model.py):
Interpolation Method:
For Euclid, we do not want to assume
y = mx + c
but instead need a more general interpolation tool.This would either be some sort of spline fit, or an equation with more parameters.
We also need the interpolation to factor in the inferred errors on each model fit, which I believe we currently do not do.
@rjmassey do you have any suggestions for how to do this, or what algorithm to you?
The text was updated successfully, but these errors were encountered: