# DistributionAggregateFunction.DistributionAggregateFunctionMode (ARX Developer Documentation)

org.deidentifier.arx.framework.check.distribution

## Class DistributionAggregateFunction.DistributionAggregateFunctionMode

- java.lang.Object
- - org.deidentifier.arx.framework.check.distribution.DistributionAggregateFunction
  - - org.deidentifier.arx.framework.check.distribution.DistributionAggregateFunction.DistributionAggregateFunctionMode

- All Implemented Interfaces:
    java.io.Serializable
  Enclosing class:
    DistributionAggregateFunction

      public static class DistributionAggregateFunction.DistributionAggregateFunctionMode
      extends DistributionAggregateFunction

  This class calculates the mode for a given distribution.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.deidentifier.arx.framework.check.distribution.DistributionAggregateFunction

      `DistributionAggregateFunction.DistributionAggregateFunctionArithmeticMean, DistributionAggregateFunction.DistributionAggregateFunctionGeneralization, DistributionAggregateFunction.DistributionAggregateFunctionGeometricMean, DistributionAggregateFunction.DistributionAggregateFunctionInterval, DistributionAggregateFunction.DistributionAggregateFunctionMedian, DistributionAggregateFunction.DistributionAggregateFunctionMode`

  - ### Field Summary

    - ### Fields inherited from class org.deidentifier.arx.framework.check.distribution.DistributionAggregateFunction

      `dictionary, hierarchy, ignoreMissingData, type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DistributionAggregateFunction.DistributionAggregateFunctionMode(boolean ignoreMissingData)` Instantiates.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> java.lang.String` | `aggregate(Distribution distribution)` This function returns an aggregate value.
    `DistributionAggregateFunction.DistributionAggregateFunctionMode` | `clone()` Clone method
    `<T> double` | `getError(Distribution distribution)` Returns the normalized error induced by aggregation.
    `void` | `initialize(java.lang.String[] dictionary, DataType<?> type, int[][] hierarchy)` Initializes the function

    - ### Methods inherited from class org.deidentifier.arx.framework.check.distribution.DistributionAggregateFunction

      `addAll, getInformationLoss, getMinMax, getNMSE, isTypePreserving`

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

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

- - ### Constructor Detail

    - #### DistributionAggregateFunction.DistributionAggregateFunctionMode

          public DistributionAggregateFunction.DistributionAggregateFunctionMode(boolean ignoreMissingData)

      Instantiates.
      Parameters:
        `ignoreMissingData` -

  - ### Method Detail

    - #### aggregate

          public <T> java.lang.String aggregate(Distribution distribution)

      Description copied from class: `DistributionAggregateFunction`
      This function returns an aggregate value.
      Specified by:
        `aggregate` in class `DistributionAggregateFunction`
      Returns:
        the string

    - #### clone

          public DistributionAggregateFunction.DistributionAggregateFunctionMode clone()

      Clone method
      Specified by:
        `clone` in class `DistributionAggregateFunction`

    - #### getError

          public <T> double getError(Distribution distribution)

      Description copied from class: `DistributionAggregateFunction`
      Returns the normalized error induced by aggregation. In most cases this will be the mean squared error normalized into [0,1]. In case of generalization, it will return the normalized generalization level (also called generalization intensity). In case of intervals, it will return the normalized number of aggregated values.
      Specified by:
        `getError` in class `DistributionAggregateFunction`
      Returns:

    - #### initialize

          public void initialize(java.lang.String[] dictionary,
                        DataType<?> type,
                        int[][] hierarchy)

      Description copied from class: `DistributionAggregateFunction`
      Initializes the function
      Overrides:
        `initialize` in class `DistributionAggregateFunction`