org.deidentifier.arx.criteria

## Class EntropyLDiversity

- java.lang.Object
- - org.deidentifier.arx.criteria.PrivacyCriterion
  - - org.deidentifier.arx.criteria.ExplicitPrivacyCriterion
    - - org.deidentifier.arx.criteria.LDiversity
      - - org.deidentifier.arx.criteria.EntropyLDiversity

All Implemented Interfaces:
  java.io.Serializable

    public class EntropyLDiversity
    extends LDiversity

The entropy l-diversity privacy model.

Author:
  Fabian Prasser, Florian Kohlmayer, Sebastian Stammler
See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`static class` `EntropyLDiversity.EntropyEstimator` Enumerator of entropy estimators for the entropy-l-diversity privacy model.

### Constructor Summary

Constructors
Constructor and Description
`EntropyLDiversity(java.lang.String attribute, double l)` Creates a new instance of the entropy l-diversity model as proposed in: Machanavajjhala A, Kifer D, Gehrke J. l-diversity: Privacy beyond k-anonymity.
`EntropyLDiversity(java.lang.String attribute, double l, EntropyLDiversity.EntropyEstimator estimator)` Creates a new instance of the entropy-l-diversity privacy model, specifying the entropy estimator be to used.

### Method Summary

All Methods Instance Methods Concrete Methods
`EntropyLDiversity` `clone()` Clone
`EntropyLDiversity.EntropyEstimator` `getEstimator()` Returns the entropy estimator used by this instance
`boolean` `isAnonymous(Transformation<?> node, HashGroupifyEntry entry)` Implement this, to enforce the criterion.
`boolean` `isLocalRecodingSupported()` Returns whether the criterion supports local recoding.
`ElementData` `render()` Renders the privacy model
`java.lang.String` `toString()` Returns a string representation.

### Methods inherited from class org.deidentifier.arx.criteria.LDiversity

`getL, getMinimalClassSize, getRequirements, getRiskThresholdJournalist, getRiskThresholdMarketer, getRiskThresholdProsecutor, isMinimalClassSizeAvailable`

### Methods inherited from class org.deidentifier.arx.criteria.ExplicitPrivacyCriterion

`getAttribute, initialize`

### Methods inherited from class org.deidentifier.arx.criteria.PrivacyCriterion

`clone, getDataSubset, getPopulationModel, getSubset, isHeuristicSearchSupported, isHeuristicSearchWithTimeLimitSupported, isMonotonicWithGeneralization, isMonotonicWithSuppression, isOptimalSearchSupported, isSampleBased, isSubsetAvailable`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### EntropyLDiversity

    public EntropyLDiversity(java.lang.String attribute,
                             double l)

Creates a new instance of the entropy l-diversity model as proposed in:
Machanavajjhala A, Kifer D, Gehrke J. l-diversity: Privacy beyond k-anonymity.
Transactions on Knowledge Discovery from Data (TKDD). 2007;1(1):3.

Parameters:
  `attribute` -
  `l` -

#### EntropyLDiversity

    public EntropyLDiversity(java.lang.String attribute,
                             double l,
                             EntropyLDiversity.EntropyEstimator estimator)

Creates a new instance of the entropy-l-diversity privacy model, specifying the entropy estimator be to used. Two estimators are available:

- SHANNON for the usual naive Shannon estimator: this amounts to the original entropy-l-diversity definition by Machanavajjhala.
- GRASSBERGER for the corrected Grassberger estimator as proposed in: P Grassberger. Entropy Estimates from Insufficient Samplings. https://arxiv.org/abs/physics/0307138v2
  This estimator generally accepts more sets as being entropy-l-diverse than the naive Shannon estimator, thus increases data utility. It also guarantees a more consistent meaning of the security parameter l between different data sets. For details take a look at: S Stammler, S Katzenbeisser, K Hamacher. Correcting Finite Sampling Issues in Entropy l-diversity. Privacy in Statistical Databases 2016. LNCS Vol. 9867 pp 135-146

Parameters:
  `attribute` - The sensitive attribute
  `l` - Security parameter
  `estimator` - Entropy estimator (SHANNON or GRASSBERGER)

### Method Detail

#### clone

    public EntropyLDiversity clone()

Description copied from class: `PrivacyCriterion`
Clone

Specified by:
  `clone` in class `PrivacyCriterion`

#### getEstimator

    public EntropyLDiversity.EntropyEstimator getEstimator()

Returns the entropy estimator used by this instance

Returns:

#### isAnonymous

    public boolean isAnonymous(Transformation<?> node,
                               HashGroupifyEntry entry)

Description copied from class: `PrivacyCriterion`
Implement this, to enforce the criterion.

Specified by:
  `isAnonymous` in class `PrivacyCriterion`
Parameters:
  `node` - TODO
Returns:

#### isLocalRecodingSupported

    public boolean isLocalRecodingSupported()

Description copied from class: `PrivacyCriterion`
Returns whether the criterion supports local recoding.

Specified by:
  `isLocalRecodingSupported` in class `PrivacyCriterion`
Returns:

#### render

    public ElementData render()

Description copied from class: `PrivacyCriterion`
Renders the privacy model

Specified by:
  `render` in class `PrivacyCriterion`
Returns:

#### toString

    public java.lang.String toString()

Description copied from class: `PrivacyCriterion`
Returns a string representation.

Specified by:
  `toString` in class `PrivacyCriterion`