Klasse ExponentialMechanism<T>

java.lang.Object
org.deidentifier.arx.dp.ExponentialMechanism<T>

public class ExponentialMechanism<T> extends Object
An implementation of the exponential mechanism for discrete domains as proposed in: McSherry, Frank, and Kunal Talwar: Mechanism design via differential privacy. Foundations of Computer Science 2007. pp. 94-103 This implementation assumes that all score values have been divided by the sensitivity of the respective score function. We point out that this implementation draws from a probability distribution which approximates the mathematically precise distribution of the exponential mechanism as a consequence of floating-point arithmetic, which could potentially affect the privacy guarantees provided. However, it can be shown that the resulting absolute exceedance of the privacy parameter epsilon is at most in the order of E = log( (1 + n * 2^{-51})^2 ) where n is the size of the domain. For various values of n, these absolute errors are as follows: ------------------------------------------------------------------------------------------------------------------------ | n | 10^1 | 10^2 | 10^3 | 10^4 | 10^5 | 10^6 | 10^7 | 10^8 | 10^9 | ------------------------------------------------------------------------------------------------------------------------ | E | 9*10^{-15} | 9*10^{-14} | 9*10^{-13} | 9*10^{-12} | 9*10^{-11} | 9*10^{-10} | 9*10^{-9} | 9*10^{-8} | 9*10^{-7} | ------------------------------------------------------------------------------------------------------------------------
  • Konstruktordetails

    • ExponentialMechanism

      public ExponentialMechanism(double epsilon)
      Constructs a new instance
      Parameter:
      epsilon -
    • ExponentialMechanism

      public ExponentialMechanism(double epsilon, boolean deterministic)
      Constructs a new instance Note: *never* set deterministic to true in production. It is implemented for testing purposes, only.
      Parameter:
      epsilon -
      deterministic -
  • Methodendetails

    • sample

      public T sample()
      Returns a random sampled value
      Gibt zurück:
    • setDistribution

      public void setDistribution(T[] values, double[] scores)
      Sets the distribution to sample from. The arrays values and scores have to have the same length.
      Parameter:
      values -
      scores -