PrivacyBudget#
from tmlt.analytics import PrivacyBudget
- class tmlt.analytics.PrivacyBudget#
Bases:
ABC
Base class for specifying the maximal privacy loss of a Session or a query.
A PrivacyBudget is a privacy definition, along with its associated parameters. The choice of a PrivacyBudget has an impact on the accuracy of query results. Smaller parameters correspond to a stronger privacy guarantee, and usually lead to less accurate results.
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.
- abstract property value: ExactNumber | Tuple[ExactNumber, ExactNumber]#
Return the value of the privacy budget.
- abstract __truediv__(other)#
Budgets can be divided by finite integer/float values > 0.
- Return type:
- abstract __mul__(other)#
Budgets can be multiplied by finite integer/float values >= 0.
- Return type:
- abstract __add__(other)#
Budgets can be added to other budgets of compatible types.
Addition is only supported so long as the result is still a valid budget (i.e. all parameters fall within valid ranges).
- Return type:
- abstract __sub__(other)#
Budgets can be subtracted from other budgets of compatible types.
Subtraction is only supported so long as the result is still a valid budget (i.e. all parameters fall within valid ranges).
Subtracting anything from an infinite budget will return an infinite budget.
- Return type:
- abstract classmethod inf()#
Get an infinite budget of this type.
- Return type: