Function opendp::measurements::then_laplace_threshold

source ·
pub fn then_laplace_threshold<TK, TV>(
    scale: TV,
    threshold: TV,
    k: Option<i32>
) -> PartialMeasurement<MapDomain<AtomDomain<TK>, AtomDomain<TV>>, HashMap<TK, TV>, L1Distance<TV>, FixedSmoothedMaxDivergence<TV>>
Expand description

Make a Measurement that uses propose-test-release to privatize a hashmap of counts.

This function takes a noise granularity in terms of 2^k. Larger granularities are more computationally efficient, but have a looser privacy map. If k is not set, k defaults to the smallest granularity.

§Arguments

  • input_domain - Domain of the input.
  • input_metric - Metric for the input domain.
  • scale - Noise scale parameter for the laplace distribution. scale == standard_deviation / sqrt(2).
  • threshold - Exclude counts that are less than this minimum value.
  • k - The noise granularity in terms of 2^k.

§Generics

  • TK - Type of Key. Must be hashable/categorical.
  • TV - Type of Value. Must be float.