-
Notifications
You must be signed in to change notification settings - Fork 66
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
Modify StepFit metric to be RMSE #72
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
@googlebot I fixed it. |
This PR (HEAD: 734ebcc) has been imported to Gerrit for code review. Please visit review.skia.org/420563 to see it. Please CC yourself to the Gerrit change. Note:
|
Copying my comment over from https://skia-review.googlesource.com/c/buildbot/+/420563: Thanks, as you found in the comments, this is a known issue. The problem is that 'fixing' it would require changing A preferred fix would be to add a new stepDetection type that |
I see, that makes sense. I made a change to add a new stepDetection type which uses RMSE in the regression calculation. Out of curiosity, was the original equation simply a mistake, or does the square root of the sum of squared errors divided by the sample size, In fact, if you substitute SSE for I hope that makes sense (and I didn't make any errors). I may have made a logical jump or applied statistical quantities where there assumptions do not hold up. Also writing math as text is hard! |
Thanks, let's continue the review over in Gerrit: https://skia-review.googlesource.com/c/buildbot/+/420563 |
This PR makes a slight modification to how the StepFit algorithm calculates the step function fitness.
I came across this project through these two blogs:
I did not understand the method for calculating the error of the step function fit. The blog calculates
and the code similarly calculates (lse == stepError)
The comment in the code mentions that
lse
should be set to sqrt(lse / len(trace)), which would be the Root Mean Squared Error,(RMSE) instead it computes sqrt(lse) / len(trace). I am not sure what this quantity represents. One would typically use Mean Square Error or RSME to calculate how well a model fits some data.Therefore, this PR changes the function to use RMSE as the measure of error of the step function fit.
References:
https://en.wikipedia.org/wiki/Root-mean-square_deviation