# MetricMDNMLossPrecomputed (ARX GUI Documentation)

org.deidentifier.arx.metric.v2

## Class MetricMDNMLossPrecomputed

- java.lang.Object
- - org.deidentifier.arx.metric.Metric<AbstractILMultiDimensional>
  - - org.deidentifier.arx.metric.v2.AbstractMetricMultiDimensional
    - - org.deidentifier.arx.metric.v2.MetricMDNMLoss
      - - org.deidentifier.arx.metric.v2.MetricMDNMLossPrecomputed

- All Implemented Interfaces:
    java.io.Serializable

      public class MetricMDNMLossPrecomputed
      extends MetricMDNMLoss

  This class implements a variant of the Loss metric. TODO: Add reference.
  See Also:
    Serialized Form

- - ### Nested Class Summary

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

      `Metric.AggregateFunction`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `MetricMDNMLossPrecomputed()` Creates a new instance.
    `protected` | `MetricMDNMLossPrecomputed(double gsFactor, Metric.AggregateFunction function)` Creates a new instance.
    `protected` | `MetricMDNMLossPrecomputed(Metric.AggregateFunction function)` Creates a new instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MetricConfiguration` | `getConfiguration()` Returns the configuration of this metric.
    `protected AbstractILMultiDimensional` | `getLowerBoundInternal(org.deidentifier.arx.framework.lattice.Transformation node)` Returns a lower bound for the information loss for the given node.
    `protected AbstractILMultiDimensional` | `getLowerBoundInternal(org.deidentifier.arx.framework.lattice.Transformation node, org.deidentifier.arx.framework.check.groupify.HashGroupify g)` Returns a lower bound for the information loss for the given node.
    `protected void` | `initializeInternal(org.deidentifier.arx.framework.data.DataManager manager, DataDefinition definition, org.deidentifier.arx.framework.data.Data input, org.deidentifier.arx.framework.data.GeneralizationHierarchy[] hierarchies, ARXConfiguration config)` Implement this to initialize the metric.
    `boolean` | `isAbleToHandleMicroaggregation()` Returns whether this metric handles microaggregation
    `boolean` | `isGSFactorSupported()` Returns whether a generalization/suppression factor is supported
    `boolean` | `isPrecomputed()` Returns whether the metric is precomputed
    `ElementData` | `render(ARXConfiguration config)` Renders the privacy model

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

      `getGeneralizationFactor, getGeneralizationSuppressionFactor, getInformationLossInternal, getInformationLossInternal, getName, getShares, getSuppressionFactor, normalizeAggregated, normalizeGeneralized, toString`

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

      `createInformationLoss, createInformationLossWithBound, createInformationLossWithoutBound, createMaxInformationLoss, createMinInformationLoss, getAggregateFunction, getAggregateFunctions, getDimensions, getDimensionsAggregated, getDimensionsGeneralized, getError, getMicroaggregationFunctions, getMicroaggregationStartIndex, initialize, setMax, setMin`

    - ### 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, getDescription, getDescription, getInformationLoss, getInformationLoss, getLowerBound, getLowerBound, getNumRecords, getSubset, initialize, isIndependent, isMonotonic, isMonotonicWithGeneralization, isMonotonicWithSuppression, isMultiDimensional, isWeighted, list, round`

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

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

- - ### Constructor Detail

    - #### MetricMDNMLossPrecomputed

          protected MetricMDNMLossPrecomputed()

      Creates a new instance.

    - #### MetricMDNMLossPrecomputed

          protected MetricMDNMLossPrecomputed(Metric.AggregateFunction function)

      Creates a new instance.
      Parameters:
        `function` -

    - #### MetricMDNMLossPrecomputed

          protected MetricMDNMLossPrecomputed(double gsFactor,
                                   Metric.AggregateFunction function)

      Creates a new instance.
      Parameters:
        `gsFactor` -
        `function` -

  - ### Method Detail

    - #### getConfiguration

          public MetricConfiguration getConfiguration()

      Returns the configuration of this metric.
      Overrides:
        `getConfiguration` in class `MetricMDNMLoss`
      Returns:

    - #### isAbleToHandleMicroaggregation

          public boolean isAbleToHandleMicroaggregation()

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

    - #### isGSFactorSupported

          public boolean isGSFactorSupported()

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

    - #### isPrecomputed

          public boolean isPrecomputed()

      Description copied from class: `Metric`
      Returns whether the metric is precomputed
      Overrides:
        `isPrecomputed` in class `Metric<AbstractILMultiDimensional>`
      Returns:

    - #### render

          public ElementData render(ARXConfiguration config)

      Description copied from class: `Metric`
      Renders the privacy model
      Overrides:
        `render` in class `MetricMDNMLoss`
      Returns:

    - #### getLowerBoundInternal

          protected AbstractILMultiDimensional getLowerBoundInternal(org.deidentifier.arx.framework.lattice.Transformation node)

      Description copied from class: `Metric`
      Returns a lower bound for the information loss for the given node. This can be used to expose the results of monotonic shares of a metric, which can significantly speed-up the anonymization process. If no such metric exists, simply return `null`.
      Overrides:
        `getLowerBoundInternal` in class `MetricMDNMLoss`
      Returns:

    - #### getLowerBoundInternal

          protected AbstractILMultiDimensional getLowerBoundInternal(org.deidentifier.arx.framework.lattice.Transformation node,
                                                         org.deidentifier.arx.framework.check.groupify.HashGroupify g)

      Description copied from class: `Metric`
      Returns a lower bound for the information loss for the given node. This can be used to expose the results of monotonic shares of a metric, which can significantly speed-up the anonymization process. If no such metric exists, simply return `null`.
      This variant of the method allows computing a monotonic share based on a groupified data representation. IMPORTANT NOTE: The groups may not have been classified correctly when the method is called, i.e., HashGroupifyEntry.isNotOutlier may not be set correctly!
      Overrides:
        `getLowerBoundInternal` in class `MetricMDNMLoss`
      Returns:

    - #### initializeInternal

          protected void initializeInternal(org.deidentifier.arx.framework.data.DataManager manager,
                                DataDefinition definition,
                                org.deidentifier.arx.framework.data.Data input,
                                org.deidentifier.arx.framework.data.GeneralizationHierarchy[] hierarchies,
                                ARXConfiguration config)

      Description copied from class: `Metric`
      Implement this to initialize the metric.
      Overrides:
        `initializeInternal` in class `MetricMDNMLoss`