Function opendp::accuracy::discrete_laplacian_scale_to_accuracy
source · pub fn discrete_laplacian_scale_to_accuracy<T: Float + Zero + One + Debug>(
scale: T,
alpha: T
) -> Fallible<T>
Expand description
Convert a discrete Laplacian scale into an accuracy estimate (tolerance) at a statistical significance level alpha
.
$\alpha = P[Y \ge accuracy]$, where $Y = |X - z|$, and $X \sim \mathcal{L}_{Z}(0, scale)$. That is, $X$ is a discrete Laplace random variable and $Y$ is the distribution of the errors.
This function returns a float accuracy. You can take the floor without affecting the coverage probability.
Arguments
scale
- Discrete Laplacian noise scale.alpha
- Statistical significance, level-alpha
, or (1. -alpha
)100% confidence. Must be within (0, 1].
Generics
T
- Data type ofscale
andalpha