# MetricSDNMEntropyBasedInformationLoss (ARX API Documentation)

org.deidentifier.arx.metric.v2

## Class MetricSDNMEntropyBasedInformationLoss

- java.lang.Object
- - org.deidentifier.arx.metric.Metric<ILSingleDimensional>
  - - org.deidentifier.arx.metric.v2.AbstractMetricSingleDimensional
    - - org.deidentifier.arx.metric.v2.MetricSDNMEntropyBasedInformationLoss

- All Implemented Interfaces:
    java.io.Serializable

      public class MetricSDNMEntropyBasedInformationLoss
      extends AbstractMetricSingleDimensional

  This class implements a the entropy-based information loss model proposed in:
  A Game Theoretic Framework for Analyzing Re-Identification Risk. Zhiyu Wan, Yevgeniy Vorobeychik, Weiyi Xia, Ellen Wright Clayton, Murat Kantarcioglu, Ranjit Ganta, Raymond Heatherly, Bradley A. Malin PLOS|ONE. 2015.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.deidentifier.arx.metric.Metric

      `Metric.AggregateFunction`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MetricSDNMEntropyBasedInformationLoss()` Creates a new instance.
    `MetricSDNMEntropyBasedInformationLoss(double gsFactor)` Creates a new instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ILSingleDimensional` | `createMaxInformationLoss()` Returns an instance of the maximal value.
    `ILSingleDimensional` | `createMinInformationLoss()` Returns an instance of the minimal value.
    `MetricConfiguration` | `getConfiguration()` Returns the configuration of this metric.

    `static double`

    `getEntropyBasedInformationLoss(org.deidentifier.arx.framework.lattice.Transformation transformation, org.deidentifier.arx.framework.check.groupify.HashGroupifyEntry entry, DomainShare[] shares, org.deidentifier.arx.framework.check.distribution.DistributionAggregateFunction[] microaggregationFunctions, int microaggregationStartIndex, double maxIL)`
    Implements the entropy-based IL model.

    `static double` | `getMaximalEntropyBasedInformationLoss(DomainShare[] domainShares, int[] domainSizes)` Returns the maximal entropy-based information loss
    `java.lang.String` | `getName()` Returns the name of metric.
    `boolean` | `isAbleToHandleMicroaggregation()` Returns whether this metric handles microaggregation
    `boolean` | `isGSFactorSupported()` Returns whether a generalization/suppression factor is supported
    `ElementData` | `render(ARXConfiguration config)` Renders the privacy model
    `java.lang.String` | `toString()` Returns the name of metric.

    - ### Methods inherited from class org.deidentifier.arx.metric.v2.AbstractMetricSingleDimensional

      `createInformationLoss, createInformationLoss`

    - ### Methods inherited from class org.deidentifier.arx.metric.Metric

      `createAECSMetric, createAECSMetric, createAmbiguityMetric, createDiscernabilityMetric, createDiscernabilityMetric, createEntropyBasedInformationLossMetric, createEntropyBasedInformationLossMetric, createEntropyMetric, createEntropyMetric, createEntropyMetric, createEntropyMetric, createEntropyMetric, createEntropyMetric, createHeightMetric, createHeightMetric, createInstanceOfHighestScore, createInstanceOfLowestScore, createKLDivergenceMetric, createLossMetric, createLossMetric, createLossMetric, createLossMetric, createMetric, createNormalizedEntropyMetric, createNormalizedEntropyMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecomputedEntropyMetric, createPrecomputedEntropyMetric, createPrecomputedEntropyMetric, createPrecomputedEntropyMetric, createPrecomputedEntropyMetric, createPrecomputedEntropyMetric, createPrecomputedLossMetric, createPrecomputedLossMetric, createPrecomputedLossMetric, createPrecomputedLossMetric, createPrecomputedNormalizedEntropyMetric, createPrecomputedNormalizedEntropyMetric, createPublisherPayoutMetric, createPublisherPayoutMetric, createStaticMetric, createStaticMetric, getAggregateFunction, getDescription, getGeneralizationFactor, getGeneralizationSuppressionFactor, getInformationLoss, getInformationLoss, getLowerBound, getLowerBound, getSuppressionFactor, initialize, isIndependent, isMonotonic, isMonotonicWithGeneralization, isMonotonicWithSuppression, isMultiDimensional, isPrecomputed, isWeighted, list`

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

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

- - ### Constructor Detail

    - #### MetricSDNMEntropyBasedInformationLoss

          public MetricSDNMEntropyBasedInformationLoss()

      Creates a new instance. Default constructor which treats all transformation methods equally.

    - #### MetricSDNMEntropyBasedInformationLoss

          public MetricSDNMEntropyBasedInformationLoss(double gsFactor)

      Creates a new instance.
      Parameters:
        `gsFactor` - A factor [0,1] weighting generalization and suppression. The default value is 0.5, which means that generalization and suppression will be treated equally. A factor of 0 will favor suppression, and a factor of 1 will favor generalization. The values in between can be used for balancing both methods.

  - ### Method Detail

    - #### getEntropyBasedInformationLoss

          public static double getEntropyBasedInformationLoss(org.deidentifier.arx.framework.lattice.Transformation transformation,
                                              org.deidentifier.arx.framework.check.groupify.HashGroupifyEntry entry,
                                              DomainShare[] shares,
                                              org.deidentifier.arx.framework.check.distribution.DistributionAggregateFunction[] microaggregationFunctions,
                                              int microaggregationStartIndex,
                                              double maxIL)

      Implements the entropy-based IL model. Ignores record suppression. Returns the loss for exactly one record.
      Parameters:
        `transformation` -
        `entry` -
        `shares` -
        `functions` -
        `microaggregationStartIndex` -
        `maxIL` -
      Returns:

    - #### getMaximalEntropyBasedInformationLoss

          public static double getMaximalEntropyBasedInformationLoss(DomainShare[] domainShares,
                                                     int[] domainSizes)

      Returns the maximal entropy-based information loss
      Parameters:
        `domainShares` - For generalized attributes
        `domainSizes` - For microaggregated attributes
      Returns:

    - #### createMaxInformationLoss

          public ILSingleDimensional createMaxInformationLoss()

      Description copied from class: `Metric`
      Returns an instance of the maximal value.
      Overrides:
        `createMaxInformationLoss` in class `AbstractMetricSingleDimensional`
      Returns:

    - #### createMinInformationLoss

          public ILSingleDimensional createMinInformationLoss()

      Description copied from class: `Metric`
      Returns an instance of the minimal value.
      Overrides:
        `createMinInformationLoss` in class `AbstractMetricSingleDimensional`
      Returns:

    - #### getConfiguration

          public MetricConfiguration getConfiguration()

      Returns the configuration of this metric.
      Overrides:
        `getConfiguration` in class `Metric<ILSingleDimensional>`
      Returns:

    - #### getName

          public java.lang.String getName()

      Description copied from class: `Metric`
      Returns the name of metric.
      Overrides:
        `getName` in class `Metric<ILSingleDimensional>`
      Returns:

    - #### isAbleToHandleMicroaggregation

          public boolean isAbleToHandleMicroaggregation()

      Description copied from class: `Metric`
      Returns whether this metric handles microaggregation
      Overrides:
        `isAbleToHandleMicroaggregation` in class `Metric<ILSingleDimensional>`
      Returns:

    - #### isGSFactorSupported

          public boolean isGSFactorSupported()

      Description copied from class: `Metric`
      Returns whether a generalization/suppression factor is supported
      Overrides:
        `isGSFactorSupported` in class `Metric<ILSingleDimensional>`
      Returns:

    - #### render

          public ElementData render(ARXConfiguration config)

      Description copied from class: `Metric`
      Renders the privacy model
      Specified by:
        `render` in class `Metric<ILSingleDimensional>`
      Returns:

    - #### toString

          public java.lang.String toString()

      Description copied from class: `Metric`
      Returns the name of metric.
      Overrides:
        `toString` in class `Metric<ILSingleDimensional>`