-
Notifications
You must be signed in to change notification settings - Fork 11
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
Output uniformly random guess at frequency distribution when reach is too small #1498
Output uniformly random guess at frequency distribution when reach is too small #1498
Conversation
Current dependencies on/for this PR: This stack of pull requests is managed by Graphite. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @chenweiw and @riemanli)
src/main/kotlin/org/wfanet/measurement/measurementconsumer/stats/LiquidLegions.kt
line 275 at r1 (raw file):
// When reach is too small, we have little info to estimate frequency, and thus the estimate of // relative frequency is equivalent to a uniformly random guess at probability.
nit: "uniformly random guess of a probability in [0, 1]."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @riemanli)
src/main/kotlin/org/wfanet/measurement/measurementconsumer/stats/MeasurementStatistics.kt
line 91 at r1 (raw file):
* A reach result is considered too small when computing variances of relative frequency if the 95% * confidence interval of the reach covers 0 or negative values. The 95% confidence interval = * reach_result +/- 1.96 * reach_std.
Do we always consider "95%" confidence interval here or is "95%" defined by the customer's input? If it is the former, then nothing needs to be changed.
0963363
to
675b83b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 4 files reviewed, 1 unresolved discussion (waiting on @chenweiw and @stevenwarejones)
src/main/kotlin/org/wfanet/measurement/measurementconsumer/stats/LiquidLegions.kt
line 275 at r1 (raw file):
Previously, jiayu-google wrote…
nit: "uniformly random guess of a probability in [0, 1]."
Done.
src/main/kotlin/org/wfanet/measurement/measurementconsumer/stats/MeasurementStatistics.kt
line 91 at r1 (raw file):
Previously, chenweiw wrote…
Do we always consider "95%" confidence interval here or is "95%" defined by the customer's input? If it is the former, then nothing needs to be changed.
It's hardcoded right now. Not sure if it makes sense to let user control this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 4 files reviewed, all discussions resolved (waiting on @stevenwarejones)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 4 files reviewed, all discussions resolved (waiting on @stevenwarejones)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 4 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @riemanli)
675b83b
to
30e69c9
Compare
… too small (#1498) The variance calculation of frequency distribution will output `NaN` when reach is zero. Moreover, the estimated variance is not accurate when reach is impractically small. The solution is to check whether the reach is too small using its confidence interval. If the confidence interval of the reach contains values <= 0, we claim the reach is too small for an accurate variance estimate of frequency distribution, and output the variance of uniformly random draw from [0, 1].
The variance calculation of frequency distribution will output
NaN
when reach is zero. Moreover, the estimated variance is not accurate when reach is impractically small. The solution is to check whether the reach is too small using its confidence interval. If the confidence interval of the reach contains values <= 0, we claim the reach is too small for an accurate variance estimate of frequency distribution, and output the variance of uniformly random draw from [0, 1].