pub fn make_base_ptr<TK, TV>(
    scale: TV,
    threshold: TV,
    k: Option<i32>
) -> Fallible<Measurement<MapDomain<AtomDomain<TK>, AtomDomain<TV>>, HashMap<TK, TV>, L1Distance<TV>, SmoothedMaxDivergence<TV>>>where
    TK: Hashable,
    TV: Float + SampleDiscreteLaplaceZ2k,
    i32: ExactIntCast<TV::Bits>,
    (MapDomain<AtomDomain<TK>, AtomDomain<TV>>, L1Distance<TV>): MetricSpace,
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

  • scale - Noise scale parameter for the laplace distribution. scale == sqrt(2) * standard_deviation.
  • 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.