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
This abstract class represents a function that aggregates values from a frequency distribution
- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic classThis class calculates the arithmetic mean for a given distribution.static classThis class calculates the geometric mean for a given distribution.static classThis class calculates the mode for a given distribution.static classThis class calculates the median for a given distribution.static classThis class calculates the mode for a given distribution.static classThis class calculates the mode for a given distribution falling back to drawing from multiple values that would qualify as mode using the provided distributionstatic classThis class calculates a set for a given distribution. -
Feldübersicht
Felder -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungDistributionAggregateFunction(boolean ignoreMissingData, boolean typePreserving) Instantiates a new function. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected <T> voidaddAll(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 objectabstract <T> Stringaggregate(Distribution distribution) This function returns an aggregate value.abstract DistributionAggregateFunctionclone()Clones this functionabstract <T> doublegetError(Distribution distribution) Returns the normalized error induced by aggregation.<T> doublegetInformationLoss(Distribution distribution) This will return the normalized number of aggregated values in range [1/#distinct-values, 1].protected <T> double[]getMinMax(String[] dictionary, DataType.DataTypeWithRatioScale<T> type) Returns the minimum and maximum valueprotected doublegetNMSE(double min, double max, double[] values, double aggregate) Calculates the mean square error after normalizing everything into [0,1]voidinitialize(String[] dictionary, DataType<?> type) Initializes the functionbooleanReturns whether this function ignores missing databooleanReturns whether this is a type-preserving function
-
Felddetails
-
ignoreMissingData
protected boolean ignoreMissingDataWhether or not null values should be ignored -
dictionary
Dictionary -
type
Type
-
-
Konstruktordetails
-
DistributionAggregateFunction
public DistributionAggregateFunction(boolean ignoreMissingData, boolean typePreserving) Instantiates a new function.- Parameter:
ignoreMissingData-typePreserving-
-
-
Methodendetails
-
aggregate
This function returns an aggregate value.- Parameter:
distribution-dictionary-type-- Gibt zurück:
- the string
-
clone
Clones this function -
getError
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
This will return the normalized number of aggregated values in range [1/#distinct-values, 1].- Parameter:
distribution-- Gibt zurück:
-
initialize
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
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:
-