Skip to content

Commit f056692

Browse files
Differential Privacy Teamcopybara-github
authored andcommitted
Consolidate remaining aggregation tests
Some tests separately calculate aggregations for value, anotherValue, and vector respectively. Refactor these tests into one test that calculates everything instead. Additionally, remove some redundant tests. PiperOrigin-RevId: 825983979
1 parent a11f262 commit f056692

File tree

4 files changed

+122
-650
lines changed

4 files changed

+122
-650
lines changed

pipelinedp4j/tests/com/google/privacy/differentialprivacy/pipelinedp4j/api/BeamApiTest.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -843,11 +843,11 @@ class BeamApiTest {
843843
"sumValue" to DoubleWithTolerance(value = 2.5, tolerance = 0.5),
844844
"meanValue" to DoubleWithTolerance(value = 0.83, tolerance = 0.5),
845845
// (1^2+(0.5)^2+1^2)/3-((1.0+0.5+1.0)/3)^2 = 0.0(5)
846-
"varianceValue" to DoubleWithTolerance(value = 0.05, tolerance = 0.05),
846+
"varianceValue" to DoubleWithTolerance(value = 0.05, tolerance = 0.1),
847847
"quantilesValue_0.5" to DoubleWithTolerance(value = 1.0, tolerance = 0.5),
848848
"sumAnotherValue" to DoubleWithTolerance(value = 4.5, tolerance = 0.5),
849849
"meanAnotherValue" to DoubleWithTolerance(value = 1.5, tolerance = 0.5),
850-
"varianceAnotherValue" to DoubleWithTolerance(value = 1.16, tolerance = 0.05),
850+
"varianceAnotherValue" to DoubleWithTolerance(value = 1.16, tolerance = 0.1),
851851
"quantilesAnotherValue_0.5" to DoubleWithTolerance(value = 2.0, tolerance = 0.5),
852852
),
853853
mapOf(
@@ -928,11 +928,11 @@ class BeamApiTest {
928928
"cnt" to DoubleWithTolerance(value = 3.0, tolerance = 0.5),
929929
"sumValue" to DoubleWithTolerance(value = 2.5, tolerance = 0.5),
930930
"meanValue" to DoubleWithTolerance(value = 0.83, tolerance = 0.5),
931-
"varianceValue" to DoubleWithTolerance(value = 0.05, tolerance = 0.05),
931+
"varianceValue" to DoubleWithTolerance(value = 0.05, tolerance = 0.1),
932932
"quantilesValue_0.5" to DoubleWithTolerance(value = 1.0, tolerance = 0.5),
933933
"sumAnotherValue" to DoubleWithTolerance(value = 4.5, tolerance = 0.5),
934934
"meanAnotherValue" to DoubleWithTolerance(value = 1.5, tolerance = 0.5),
935-
"varianceAnotherValue" to DoubleWithTolerance(value = 1.16, tolerance = 0.05),
935+
"varianceAnotherValue" to DoubleWithTolerance(value = 1.16, tolerance = 0.1),
936936
"quantilesAnotherValue_0.5" to DoubleWithTolerance(value = 2.0, tolerance = 0.5),
937937
),
938938
mapOf(

0 commit comments

Comments
 (0)