Skip to contents

Principle 2 of the paper says a q*-block is l-diverse if it contains at least l well-represented values of the sensitive attribute. The two instantiations are entropy l-diversity, Definition 4.1, -sum_s p log p >= log(l) for every block, and recursive (c, l)-diversity, Definition 4.2, r_1 < c (r_l + ... + r_m) with the block's sensitive-value counts sorted descending and 1-diversity always satisfied. Distinct l-diversity, the number of distinct sensitive values, follows from the first and is the weakest of the three. All three are reported because they disagree: the paper's Figure 4 is 3-diverse in the distinct sense and 2.8-diverse in the entropy sense.

Usage

Dpld(X, quasi_ids, sensitive, l, c = 1)

Arguments

X

Records; only its length is used, to check against the blocks.

quasi_ids

Quasi-identifier block, one row per record.

sensitive

Sensitive attribute value per record.

l

Required diversity level, at least 1.

c

Constant of recursive (c, l)-diversity, strictly positive.

Value

List with estimate, distinct_l, entropy_l, min_entropy, c_min, satisfies_distinct, satisfies_entropy, satisfies_recursive, n_blocks, min_block_size, l, c, n.

References

Machanavajjhala, A., Kifer, D., Gehrke, J. and Venkitasubramaniam, M. (2007). l-diversity: privacy beyond k-anonymity. ACM Transactions on Knowledge Discovery from Data 1(1), article 3, Definitions 4.1 and 4.2.

Examples

qi <- cbind(age = c(30, 30, 30, 40, 40, 40), zip = c(1, 1, 1, 2, 2, 2))
s <- c("flu", "cold", "flu", "cancer", "flu", "cold")
Dpld(seq_len(6), qi, s, l = 2)[c("distinct_l", "entropy_l", "satisfies_distinct")]
#> $distinct_l
#> [1] 2
#> 
#> $entropy_l
#> [1] 1.889882
#> 
#> $satisfies_distinct
#> [1] 1
#>