PureDPBudget#
from tmlt.analytics import PureDPBudget
- class tmlt.analytics.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.
- property value: ExactNumber#
Return the value of the privacy budget as an ExactNumber.
For printing purposes, you should use the epsilon property instead, as it will represent the same value, but be more human readable.
- property epsilon: int | float#
Returns the value of epsilon as an int or float.
This is helpful for human readability. If you need to use the epsilon value in a computation, you should use self.value instead.
- __hash__()#
Hashes on type and value.
- __truediv__(other)#
Divide this budget by a finite integer/float value > 0.
- Return type:
- __mul__(other)#
Multiply this budget by a finite integer/float value >= 0.
- Return type:
- __add__(other)#
Add this budget to another PureDPBudget or an ApproxDPBudget.
The resulting epsilon must be greater than zero, and the resulting delta (if any) must be in [0, 1].
- Return type:
- __sub__(other)#
Subtract a PureDPBudget from this budget.
The resulting epsilon must greater than zero. Subtracting anything from an infinite budget will return an infinite budget.
Note that you cannot subtract an ApproxDPBudget from a PureDPBudget, though the reverse is allowed.
- Return type:
- classmethod inf()#
Get an infinite budget of this type.
- Return type: