Class LeakyKAnonymity

java.lang.Object
dk.alexandra.fresco.stat.anonymisation.LeakyKAnonymity
All Implemented Interfaces:
dk.alexandra.fresco.framework.builder.Computation<MultiDimensionalArray<List<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.framework.value.SInt>>>,​dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric>

public class LeakyKAnonymity
extends Object
implements dk.alexandra.fresco.framework.builder.Computation<MultiDimensionalArray<List<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.framework.value.SInt>>>,​dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric>
Compute a k-anonymous version of a dataset. Note that the output leaks the corresponding indices of the individuals in each bucket. To avoid this, the data could be shuffled obliviously before running the computation.
  • Constructor Summary

    Constructors 
    Constructor Description
    LeakyKAnonymity​(dk.alexandra.fresco.lib.common.collections.Matrix<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.framework.value.SInt>> data, List<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.framework.value.SInt>> sensitive, List<List<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.framework.value.SInt>>> buckets, int k)
    Each row in the data set contains the quasi-identifiers of an individual with a corresponding entry in the list of values of the sensitive attribute.
  • Method Summary

    Modifier and Type Method Description
    dk.alexandra.fresco.framework.DRes<MultiDimensionalArray<List<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.framework.value.SInt>>>> buildComputation​(dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric builder)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LeakyKAnonymity

      public LeakyKAnonymity​(dk.alexandra.fresco.lib.common.collections.Matrix<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.framework.value.SInt>> data, List<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.framework.value.SInt>> sensitive, List<List<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.framework.value.SInt>>> buckets, int k)
      Each row in the data set contains the quasi-identifiers of an individual with a corresponding entry in the list of values of the sensitive attribute. The buckets indicates the desired generalization of the quasi-identifiers as the upper limits in the corresponding histogram. K is the smallest allowed number of individuals in each bucket.

      The output is a histogram on the given buckets with the value in the histogram being a list of size data.getHeight() with a non-zero entry x at index i indicating that the data point at row i is in this bucket and that the corresponding sensitive attribute was x.

      Note that the output leaks the corresponding indices of the individuals in each bucket. To avoid this the data could be shuffled obliviously before running the computation.

  • Method Details

    • buildComputation

      public dk.alexandra.fresco.framework.DRes<MultiDimensionalArray<List<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.framework.value.SInt>>>> buildComputation​(dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric builder)
      Specified by:
      buildComputation in interface dk.alexandra.fresco.framework.builder.Computation<MultiDimensionalArray<List<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.framework.value.SInt>>>,​dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric>