RhoZCDPBudget#
from tmlt.analytics import RhoZCDPBudget
- class tmlt.analytics.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.
- property value: ExactNumber#
Return the value of the privacy budget as an ExactNumber.
For printing purposes, you should use the rho property instead, as it will represent the same value, but be more human readable.
- property rho: int | float#
Returns the value of rho as an int or float.
This is helpful for human readability. If you need to use the rho 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 RhoZCDPBudget.
The resulting rho must be greater than zero.
- Return type:
- __sub__(other)#
Subtract a RhoZCDPBudget from this budget.
The resulting rho must be greater than zero. Subtracting anything from an infinite budget will return an infinite budget.
- Return type:
- classmethod inf()#
Get an infinite budget of this type.
- Return type: