DescriptionRefactor CalculateConfidence and add unit test.
This version is a little bit different from the last; main differences:
- I saw that the "CalculateBounds" was returning the minimum and maximum of the means of the input list, so I thought it would be easier to understand if this was done by mapping CalculateMean and then directly making a tuple with min/max.
- Since CalculateTruncatedMean(xs, 0) is just the mean, and this is used in several place, I extracted out a convenience function CalculateMean.
- CalculateConfidence doesn't refer to self, so I thought it was reasonable to move it up to be a top-level function with the other stats functions.
BUG=
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=262924
Patch Set 1 #Patch Set 2 : Update call-site of CalculateConfidence. #
Total comments: 2
Messages
Total messages: 6 (0 generated)
|