def smoothed_sens(counts, noise_eps, l, beta):
 k = 0
 smoothed_sensitivity = sens_at_k(counts, noise_eps, l, k)
 while (k < max(counts)):
  k += 1
  sensitivity_at_k = sens_at_k(counts, noise_eps, l, k)
  smoothed_sensitivity = max(smoothed_sensitivity, (math.exp(((- beta) * k)) * sensitivity_at_k))
  if (sensitivity_at_k == 0.0):
   break
 return smoothed_sensitivity

def smoothed_sens ( counts , noise_eps , l , beta ) : k = 0 smoothed_sensitivity = sens_at_k ( counts , noise_eps , l , k ) while ( k < max ( counts ) ) : k += 1 sensitivity_at_k = sens_at_k ( counts , noise_eps , l , k ) smoothed_sensitivity = max ( smoothed_sensitivity , ( math . exp ( ( ( - beta ) * k ) ) * sensitivity_at_k ) ) if ( sensitivity_at_k == 0.0 ) : break return smoothed_sensitivity
compute beta-smooth sensitivity .