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

Are numerical derivatives correct? #13

Closed
benmontet opened this issue Dec 10, 2017 · 7 comments
Closed

Are numerical derivatives correct? #13

benmontet opened this issue Dec 10, 2017 · 7 comments

Comments

@benmontet
Copy link
Owner

@mirca please check my math here. Since we're multiplying the terms together now they were definitely wrong as written previously! I'm still not convinced they're right.

@benmontet
Copy link
Owner Author

And of course by numerical derivatives I mean exactly the opposite of that, the analytic derivatives! Although we could test them numerically to make sure dlnlike exactly represents the change in likelihood between two test cases.

@benmontet
Copy link
Owner Author

benmontet commented Dec 11, 2017

Derivatives are definitely not correct. They match the numerical derivative exactly* in the case where gdd is always 1, but as soon as we have both components they break down. This obviously affects everything downstream so understanding this is highest priority!

*Well, exactly in the case where the model hasn't been shifted off the data grid and there is no model to draw on top of the residuals. We need to make the model grid larger than the data grid so it this never happens in practice. Right now I inserted a terrible hack in the likelihood calculation to not count pixels near the edges, which has the same result but is not what we want. (this is #8)

@benmontet
Copy link
Owner Author

With tensorflow, your derivatives are always correct.

@mirca
Copy link
Collaborator

mirca commented Feb 21, 2018

@benmontet That's a huge win, I'm excited to try your notebook!!

@benmontet
Copy link
Owner Author

Yeah, give it a shot! It's slow but is working with simulated data. I have a few improvements to do yet but my goal is to bring it working on real data to Preparing for TESS and use that week to apply it to K2 clusters and/or simulated TESS data. I could definitely use your expertise that week in making the code better!

@benmontet
Copy link
Owner Author

BTW congrats on your last day in the GO office! We'll miss you being around.

@mirca
Copy link
Collaborator

mirca commented Feb 21, 2018

@benmontet That's awesome! I'll do my best to be on point with tensorflow for the TESS.Ninja ;-)
Thanks a lot, Ben! ;)

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

2 participants