Klasse DistributionAggregateFunction

java.lang.Object
org.deidentifier.arx.framework.check.distribution.DistributionAggregateFunction
Alle implementierten Schnittstellen:
Serializable
Bekannte direkte Unterklassen:
DistributionAggregateFunction.DistributionAggregateFunctionArithmeticMean, DistributionAggregateFunction.DistributionAggregateFunctionGeometricMean, DistributionAggregateFunction.DistributionAggregateFunctionInterval, DistributionAggregateFunction.DistributionAggregateFunctionMedian, DistributionAggregateFunction.DistributionAggregateFunctionMode, DistributionAggregateFunction.DistributionAggregateFunctionModeWithDistributionFallback, DistributionAggregateFunction.DistributionAggregateFunctionSet

public abstract class DistributionAggregateFunction extends Object implements Serializable
This abstract class represents a function that aggregates values from a frequency distribution
Siehe auch:
  • Felddetails

    • ignoreMissingData

      protected boolean ignoreMissingData
      Whether or not null values should be ignored
    • dictionary

      protected transient String[] dictionary
      Dictionary
    • type

      protected transient DataType<?> type
      Type
  • Konstruktordetails

    • DistributionAggregateFunction

      public DistributionAggregateFunction(boolean ignoreMissingData, boolean typePreserving)
      Instantiates a new function.
      Parameter:
      ignoreMissingData -
      typePreserving -
  • Methodendetails

    • aggregate

      public abstract <T> String aggregate(Distribution distribution)
      This function returns an aggregate value.
      Parameter:
      distribution -
      dictionary -
      type -
      Gibt zurück:
      the string
    • clone

      public abstract DistributionAggregateFunction clone()
      Clones this function
      Setzt außer Kraft:
      clone in Klasse Object
    • getError

      public abstract <T> double getError(Distribution distribution)
      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.
      Parameter:
      distribution -
      Gibt zurück:
    • getInformationLoss

      public <T> double getInformationLoss(Distribution distribution)
      This will return the normalized number of aggregated values in range [1/#distinct-values, 1].
      Parameter:
      distribution -
      Gibt zurück:
    • initialize

      public void initialize(String[] dictionary, DataType<?> type)
      Initializes the function
      Parameter:
      dictionary -
      type -
      hierarchy -
    • isTypePreserving

      public boolean isTypePreserving()
      Returns whether this is a type-preserving function
      Gibt zurück:
    • isIgnoreMissingData

      public boolean isIgnoreMissingData()
      Returns whether this function ignores missing data
      Gibt zurück:
    • addAll

      protected <T> void addAll(org.apache.commons.math3.stat.descriptive.DescriptiveStatistics statistics, Distribution distribution, DataType.DataTypeWithRatioScale<T> type, double offset)
      Adds all values from the distribution to the given descriptive statistics object
      Parameter:
      statistics -
      distribution -
      type -
      offset - will be added to values
    • getMinMax

      protected <T> double[] getMinMax(String[] dictionary, DataType.DataTypeWithRatioScale<T> type)
      Returns the minimum and maximum value
      Parameter:
      dictionary -
      type -
      Gibt zurück:
    • getNMSE

      protected double getNMSE(double min, double max, double[] values, double aggregate)
      Calculates the mean square error after normalizing everything into [0,1]
      Parameter:
      min -
      max -
      values -
      aggregate -
      Gibt zurück: