pbeamtest

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package pbeamtest provides PrivacySpecs for testing Privacy on Beam pipelines without noise.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPrivacySpecNoNoiseWithContributionBounding

func NewPrivacySpecNoNoiseWithContributionBounding(epsilon, delta float64) *pbeam.PrivacySpec

NewPrivacySpecNoNoiseWithContributionBounding creates a new PrivacySpec with the specified privacy budget that adds no noise and keeps all partitions but still does contribution bounding.

The epsilon and delta arguments are the total (ε,δ)-differential privacy budget for the pipeline. If there is only one aggregation, the entire budget will be used for this aggregation. Otherwise, the user must specify how the privacy budget is split across aggregations.

This does NOT provide any privacy protections, so should only be used in test code in order to avoid dealing with random noise.

func NewPrivacySpecNoNoiseWithoutContributionBounding

func NewPrivacySpecNoNoiseWithoutContributionBounding(epsilon, delta float64) *pbeam.PrivacySpec

NewPrivacySpecNoNoiseWithoutContributionBounding creates a new PrivacySpec with the specified privacy budget that adds no noise, keeps all partitions and disables contribution bounding (both per-partition and cross-partition). The contribution bounding parameters should still be specified for all the pbeam aggregations in the pipeline since they will be validated.

The epsilon and delta arguments are the total (ε,δ)-differential privacy budget for the pipeline. If there is only one aggregation, the entire budget will be used for this aggregation. Otherwise, the user must specify how the privacy budget is split across aggregations.

This does NOT provide any privacy protections, so should only be used in test code in order to avoid dealing with random noise.

func QuantilesTolerance

func QuantilesTolerance(MinValue, MaxValue float64) float64

QuantilesTolerance returns a tolerance t such that the output of QuantilesPerKey is within t of the exact result for given MinValue and MaxValue parameters of QuantilesParams when pbeamtest is used.

Due to the implementation details of Quantiles, it has an inherent (non-DP) noise. So, even when we disable DP noise, the results will be still slightly noisy.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL