-
Notifications
You must be signed in to change notification settings - Fork 4
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
Test new approach to second derivative #275
Comments
In order to circumvent the artefacts noticed on the second derivative, I suggest trying to calculate the second derivative directly from the original function. I will report my progress in this issue. |
Status: I have made some progress today but I'm not ready to commit it yet. I need to find a clean solution to handle the edges of the curve. Otherwise, it is looking good. I'll come back to it on Monday. |
Signed-off-by: Martin Veillette <[email protected]>
I committed my work. In essence, the second derivative is calculated a double difference, except near discontinuities. |
Signed-off-by: Martin Veillette <[email protected]>
Signed-off-by: Martin Veillette <[email protected]>
Assigning to @pixelzoom to review. |
This is looking great. One suggestion: rename |
Signed-off-by: Martin Veillette <[email protected]>
In the commit above, I replaced all references of This affects three classes: 'DerivativeCurve', 'SecondDerivativeCurve' and 'IntegralCurve'. I also updated local references of |
Reassigning to @pixelzoom for review. |
I confirmed that there are no remaining occurrences of baseCurve or basePoints. I played around with the sim for awhile, and it's looking good to me. The real test would be to have one of the subject-matter experts take it for a test-drive. I'll assign back to @veillette to decide if he wants to assign to someone else for "behavioral review", or whether to close this issue. |
Let close this issue. I created an issue (#292) to let the QA team be on the lookout for this kind of problems. |
The second derivative is calculated based on the first derivative. Although it is pleasing that we follow mathematical pattern, where the second derivative is merely the derivative of the first derivative, it comes with a set of challenges.
The calculation of the first derivative is only approximate, and therefore introduces errors. As a result, these errors are then baked in our curve. The second derivative accumulates, the error associated with the calculate of a derivative, and then the errors from its basecurve.
We can see the problematic below where I used the flags
numberOfPoints=100&screens=4&allPoints=true
The function is a parabola meeting a line. There is a small error in the function, which affects the derivative, (notice the small kink near the discontinuity). In turns this affects the second derivative. At this point the error has been amplified and it shows a large discrepancy.
The text was updated successfully, but these errors were encountered: