public abstract class DistributionAggregateFunction
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
DistributionAggregateFunction.DistributionAggregateFunctionArithmeticMean
This class calculates the arithmetic mean for a given distribution.
|
static class |
DistributionAggregateFunction.DistributionAggregateFunctionGeneralization
This class generalizes the given distribution.
|
static class |
DistributionAggregateFunction.DistributionAggregateFunctionGeometricMean
This class calculates the geometric mean for a given distribution.
|
static class |
DistributionAggregateFunction.DistributionAggregateFunctionInterval
This class calculates the mode for a given distribution.
|
static class |
DistributionAggregateFunction.DistributionAggregateFunctionMedian
This class calculates the median for a given distribution.
|
static class |
DistributionAggregateFunction.DistributionAggregateFunctionMode
This class calculates the mode for a given distribution.
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
dictionary
Dictionary
|
protected int[][] |
hierarchy
Hierarchy
|
protected boolean |
ignoreMissingData
Whether or not null values should be ignored
|
protected DataType<?> |
type
Type
|
Constructor and Description |
---|
DistributionAggregateFunction(boolean ignoreMissingData,
boolean typePreserving)
Instantiates a new function.
|
Modifier and Type | Method and Description |
---|---|
protected <T> void |
addAll(org.apache.commons.math3.stat.descriptive.DescriptiveStatistics statistics,
Distribution distribution,
DataType.DataTypeWithRatioScale<T> type)
Adds all values from the distribution to the given descriptive statistics object
|
abstract <T> java.lang.String |
aggregate(Distribution distribution)
This function returns an aggregate value.
|
abstract DistributionAggregateFunction |
clone()
Clones this function
|
<T> double |
getMeanError(Distribution distribution)
Returns the normalized mean squared error in [0,1], if supported, 0d otherwise
|
protected <T> double[] |
getMinMax(java.lang.String[] dictionary,
DataType.DataTypeWithRatioScale<T> type)
Returns the minimum and maximum value
|
protected double |
getNMSE(double min,
double max,
double[] values,
double aggregate)
Calculates the mean square error after normalizing everything into [0,1]
|
void |
initialize(java.lang.String[] dictionary,
DataType<?> type,
int[][] hierarchy)
Initializes the function
|
boolean |
isTypePreserving()
Returns whether this is a type-preserving function
|
protected boolean ignoreMissingData
protected transient java.lang.String[] dictionary
protected transient DataType<?> type
protected transient int[][] hierarchy
public DistributionAggregateFunction(boolean ignoreMissingData, boolean typePreserving)
ignoreMissingData
- typePreserving
- public abstract <T> java.lang.String aggregate(Distribution distribution)
distribution
- dictionary
- type
- public abstract DistributionAggregateFunction clone()
clone
in class java.lang.Object
public <T> double getMeanError(Distribution distribution)
distribution
- public void initialize(java.lang.String[] dictionary, DataType<?> type, int[][] hierarchy)
dictionary
- type
- hierarchy
- public boolean isTypePreserving()
protected <T> void addAll(org.apache.commons.math3.stat.descriptive.DescriptiveStatistics statistics, Distribution distribution, DataType.DataTypeWithRatioScale<T> type)
statistics
- distribution
- type
- protected <T> double[] getMinMax(java.lang.String[] dictionary, DataType.DataTypeWithRatioScale<T> type)
dictionary
- type
- protected double getNMSE(double min, double max, double[] values, double aggregate)
min
- max
- values
- aggregate
-