Class LeakyKAnonymity
Object
LeakyKAnonymity
- All Implemented Interfaces:
Computation<MultiDimensionalArray<List<DRes<SInt>>>,ProtocolBuilderNumeric>
public class LeakyKAnonymity extends Object implements Computation<MultiDimensionalArray<List<DRes<SInt>>>,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(Matrix<DRes<SInt>> data, List<DRes<SInt>> sensitive, List<List<DRes<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 DRes<MultiDimensionalArray<List<DRes<SInt>>>>
buildComputation(ProtocolBuilderNumeric builder)
-
Constructor Details
-
LeakyKAnonymity
public LeakyKAnonymity(Matrix<DRes<SInt>> data, List<DRes<SInt>> sensitive, List<List<DRes<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 DRes<MultiDimensionalArray<List<DRes<SInt>>>> buildComputation(ProtocolBuilderNumeric builder)- Specified by:
buildComputation
in interfaceComputation<MultiDimensionalArray<List<DRes<SInt>>>,ProtocolBuilderNumeric>
-