privacy_budget#

Classes for specifying privacy budgets.

Classes#

PrivacyBudget

Base class for specifying privacy parameters.

PureDPBudget

A privacy budget under Pure Differential Privacy.

RhoZCDPBudget

A privacy budget under rho-Zero-Concentrated Differential Privacy.

class PrivacyBudget#

Bases: abc.ABC

Base class for specifying privacy parameters.

A PrivacyBudget associates a privacy definition with one or more numeric values. This information ultimately governs the noise that is added when evaluating queries, i.e., it controls how “private” the computation is.

Note: An “infinite” privacy budget means that the chosen DP algorithm will use parameters that do not guarantee privacy. This is not always exactly equivalent to evaluating the query without applying differential privacy. Please see the individual subclasses of PrivacyBudget for details on how to appropriately specify infinite budgets.

class PureDPBudget(epsilon)#

Bases: PrivacyBudget

A privacy budget under Pure Differential Privacy.

This privacy definition is also known as epsilon-differential privacy, and the associated value is the epsilon privacy parameter. The privacy definition can be found here

Parameters

epsilon (Union[int, float]) –

__init__(epsilon)#

Construct a new PureDPBudget.

Parameters

epsilon (int | floatUnion[int, float]) – The epsilon privacy parameter. Must be non-negative. To specify an infinite budget, set epsilon equal to float(‘inf’).

property epsilon(self)#

Returns the value of epsilon.

Return type

Union[int, float]

__eq__(self, other)#

Returns whether or not two PureDPBudgets are equivalent.

Return type

bool

class RhoZCDPBudget(rho)#

Bases: PrivacyBudget

A privacy budget under rho-Zero-Concentrated Differential Privacy.

The definition of rho-ZCDP can be found in this paper under Definition 1.1.

Parameters

rho (Union[int, float]) –

__init__(rho)#

Construct a new RhoZCDPBudget.

Parameters

rho (int | floatUnion[int, float]) – The rho privacy parameter. To specify an infinite budget, set rho equal to float(‘inf’).

property rho(self)#

Returns the value of rho.

Return type

Union[int, float]

__eq__(self, other)#

Returns whether or not two RhoZCDPBudgets are equivalent.

Return type

bool