google / differential-privacy

Google's differential privacy libraries.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When `epsilon==0`, `PrivacyLossDistribution.from_privacy_parameters()` fails.

ngrislain opened this issue · comments

If epsilon==0 (or small compared to value_discretization_interval) then rounded_probability_mass_function is assigned a dict with twice the same key, so the second will overwrite the first (python should probably not silently do that).

rounded_probability_mass_function = {
math.ceil(epsilon / value_discretization_interval):
(1 - delta) / (1 + math.exp(-epsilon)),
math.ceil(-epsilon / value_discretization_interval):
(1 - delta) / (1 + math.exp(epsilon))
}

commented

Our commit last week should have resolved this.