pub fn make_gaussian<D: MakeGaussian<MO, QI>, MO: 'static + Measure, QI: 'static>(
    input_domain: D,
    input_metric: D::InputMetric,
    scale: MO::Distance
) -> Fallible<Measurement<D, D::Carrier, D::InputMetric, MO>>where
    (D, D::InputMetric): MetricSpace,
Expand description

Make a Measurement that adds noise from the gaussian(scale) distribution to the input.

Valid inputs for input_domain and input_metric are:

input_domaininput typeinput_metric
atom_domain(T)Tabsolute_distance(QI)
vector_domain(atom_domain(T))Vec<T>l2_distance(QI)

Arguments

  • input_domain - Domain of the data type to be privatized.
  • input_metric - Metric of the data type to be privatized.
  • scale - Noise scale parameter for the gaussian distribution. scale == standard_deviation.
  • k - The noise granularity in terms of 2^k.

Generics

  • D - Domain of the data to be privatized. Valid values are VectorDomain<AtomDomain<T>> or AtomDomain<T>.
  • MO - Output Measure. The only valid measure is ZeroConcentratedDivergence<T>.
  • QI - Input distance. The type of sensitivities. Can be any integer or float.