Function smartnoise_validator::components::snapping_mechanism::accuracy_to_epsilon [−][src]
pub fn accuracy_to_epsilon(
accuracy: f64,
alpha: f64,
sensitivity: f64,
b: f64
) -> Result<f64>
Finds epsilon that will achieve desired accuracy and confidence requirements. Described in https://github.com/opendp/smartnoise-core/blob/develop/whitepapers/mechanisms/snapping/snapping_implementation_notes.pdf
Note that not all accuracies have an epsilon, due to the clamping in the snapping mechanism. In these cases, accuracy is treated as an upper bound, and a larger epsilon is returned that guarantees a tighter accuracy.
Arguments
accuracy
- Desired accuracy level (upper bound).alpha
- Desired confidence level.sensitivity
- l1 Sensitivity of function to which mechanism is being applied.
Returns
Epsilon to use for the Snapping mechanism.