From 644a5224ccb645b79e23301df8f59575309befc5 Mon Sep 17 00:00:00 2001 From: jin-xiulang Date: Thu, 30 Jul 2020 09:10:22 +0800 Subject: [PATCH] Fix a docs bug. --- mindarmour/diff_privacy/mechanisms/mechanisms.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mindarmour/diff_privacy/mechanisms/mechanisms.py b/mindarmour/diff_privacy/mechanisms/mechanisms.py index a110337..f0e0063 100644 --- a/mindarmour/diff_privacy/mechanisms/mechanisms.py +++ b/mindarmour/diff_privacy/mechanisms/mechanisms.py @@ -343,9 +343,9 @@ class _MechanismsParamsUpdater(Cell): class AdaClippingWithGaussianRandom(Cell): """ Adaptive clipping. If `decay_policy` is 'Linear', the update formula is - $ norm_bound = norm_bound - learning_rate*(beta-target_unclipped_quantile)$. - `decay_policy` is 'Geometric', the update formula is - $ norm_bound = norm_bound*exp(-learning_rate*(empirical_fraction-target_unclipped_quantile))$. + norm_bound = norm_bound - learning_rate*(beta - target_unclipped_quantile). + If `decay_policy` is 'Geometric', the update formula is norm_bound = + norm_bound*exp(-learning_rate*(empirical_fraction - target_unclipped_quantile)). where beta is the empirical fraction of samples with the value at most `target_unclipped_quantile`. @@ -355,7 +355,7 @@ class AdaClippingWithGaussianRandom(Cell): learning_rate(float): Learning rate of update norm clip. Default: 0.001. target_unclipped_quantile(float): Target quantile of norm clip. Default: 0.9. fraction_stddev(float): The stddev of Gaussian normal which used in - empirical_fraction, the formula is $empirical_fraction + N(0, fraction_stddev)$. + empirical_fraction, the formula is empirical_fraction + N(0, fraction_stddev). Default: 0.01. seed(int): Original random seed, if seed=0 random normal will use secure random number. IF seed!=0 random normal will generate values using