-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix calculation of curve fit weights (#1224)
### Summary This PR updates calculation of weights to compute residual in the curve fitting. ### Details and comments When the error bar of data points is significantly small, these data points become a dominant source of residual to minimize. This means other data points contribute little to the fit, and causes local overfit to certain data points. This is fixed by clipping the weights to remove outlier.
- Loading branch information
1 parent
c66034c
commit e4a54fb
Showing
4 changed files
with
69 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
releasenotes/notes/fix-curve-fit-weights-fb43d3aa5ed1c91c.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fix calculation of weight for curve fitting. Previously the weights of data points to obtain | ||
the residual of fit curve were computed by the inverse of the error bars of y data. | ||
This may yield significant weights on certain data points when their error bar is small or zero, | ||
and this can cause the local overfit to these data points. | ||
To avoid this edge case of small error bars, computed weights are now clipped at 90 percentile. | ||
This update might slightly change the outcome of fit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters