-
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
Fix wrong assignment in computeMetricVariance for Frequency #1464
Conversation
Current dependencies on/for this PR: This stack of pull requests is managed by Graphite. |
7e46298
to
fb6f13f
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: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @chenweiw and @riemanli)
src/test/kotlin/org/wfanet/measurement/measurementconsumer/stats/VariancesTest.kt
line 3354 at r1 (raw file):
val maximumFrequency = 5 val relativeFrequencyDistribution = (1..maximumFrequency).associateWith { (maximumFrequency - it) / 10.0 }
where is 10.0 from?
|
||
val maximumFrequency = 5 | ||
val relativeFrequencyDistribution = | ||
(1..maximumFrequency).associateWith { (maximumFrequency - it) / 10.0 } |
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.
Line 3354: what does this line mean?
2.582873680435757e+23, | ||
) | ||
.map { it * coefficient } | ||
|
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.
I'm trying to understand the number of the four lists in line 3388--3409. Where do these expected values come from?
@@ -627,7 +627,7 @@ object VariancesImpl : Variances { | |||
return FrequencyVariances( | |||
relativeVariances = frequencyVariances.relativeVariances.mapValues { coefficient * it.value }, | |||
kPlusRelativeVariances = | |||
frequencyVariances.relativeVariances.mapValues { coefficient * it.value }, | |||
frequencyVariances.kPlusRelativeVariances.mapValues { coefficient * it.value }, |
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.
So this addressed the issue that we discussed yesterday -- the stds of rk and rk+ estimations are always equal. Am I right?
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.
Hi Rieman, I just made a couple of minor comments.
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 2 files reviewed, 4 unresolved discussions (waiting on @chenweiw and @jiayu-google)
src/main/kotlin/org/wfanet/measurement/measurementconsumer/stats/Variances.kt
line 630 at r1 (raw file):
Previously, chenweiw wrote…
So this addressed the issue that we discussed yesterday -- the stds of rk and rk+ estimations are always equal. Am I right?
Yes. The fix here is using the correct field in frequencyVariances
src/test/kotlin/org/wfanet/measurement/measurementconsumer/stats/VariancesTest.kt
line 3354 at r1 (raw file):
Previously, jiayu-google wrote…
where is 10.0 from?
10.0 is the normalization term
src/test/kotlin/org/wfanet/measurement/measurementconsumer/stats/VariancesTest.kt
line 3354 at r1 (raw file):
Previously, chenweiw wrote…
Line 3354: what does this line mean?
It creates a frequency distribution of [(5 - 1) / 10, (5 - 2) / 10, (5 - 3) / 10, (5 - 4) / 10, (5 - 5) / 10] = [0.4, 0.3, 0.2, 0.1, 0]
src/test/kotlin/org/wfanet/measurement/measurementconsumer/stats/VariancesTest.kt
line 3412 at r1 (raw file):
Previously, chenweiw wrote…
I'm trying to understand the number of the four lists in line 3388--3409. Where do these expected values come from?
These values are generated from the Colab notebook you and Jiayu wrote. Basically, I use the notebook as a ground truth generator to ensure the code in prod works the same as the code in the Colab notebook.
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 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jiayu-google)
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: all files reviewed, 1 unresolved discussion (waiting on @jiayu-google and @Marco-Premier)
src/test/kotlin/org/wfanet/measurement/measurementconsumer/stats/VariancesTest.kt
line 3354 at r1 (raw file):
Previously, riemanli (Rieman) wrote…
10.0 is the normalization term
It creates a frequency distribution of [(5 - 1) / 10, (5 - 2) / 10, (5 - 3) / 10, (5 - 4) / 10, (5 - 5) / 10] = [0.4, 0.3, 0.2, 0.1, 0]
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 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jiayu-google and @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 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jiayu-google)
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.
Dismissed @jiayu-google from a discussion.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @jiayu-google)
fb6f13f
to
789d050
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: complete! all files reviewed, all discussions resolved (waiting on @riemanli)
No description provided.