com.rapidminer.tools.math.function.aggregation
Class AbstractAggregationFunction
java.lang.Object
com.rapidminer.tools.math.function.aggregation.AbstractAggregationFunction
- All Implemented Interfaces:
- AggregationFunction
- Direct Known Subclasses:
- AverageFunction, CountFunction, MaxFunction, MedianFunction, MinFunction, ModeFunction, SumFunction, VarianceFunction
public abstract class AbstractAggregationFunction
- extends java.lang.Object
- implements AggregationFunction
Superclass for aggregation functions providing some generic functions.
- Author:
- Tobias Malbrecht
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KNOWN_AGGREGATION_FUNCTIONS
public static final java.lang.Class[] KNOWN_AGGREGATION_FUNCTIONS
KNOWN_AGGREGATION_FUNCTION_NAMES
public static final java.lang.String[] KNOWN_AGGREGATION_FUNCTION_NAMES
AVERAGE
public static final int AVERAGE
- See Also:
- Constant Field Values
VARIANCE
public static final int VARIANCE
- See Also:
- Constant Field Values
STANDARD_DEVIATION
public static final int STANDARD_DEVIATION
- See Also:
- Constant Field Values
COUNT
public static final int COUNT
- See Also:
- Constant Field Values
MINIMUM
public static final int MINIMUM
- See Also:
- Constant Field Values
MAXIMUM
public static final int MAXIMUM
- See Also:
- Constant Field Values
SUM
public static final int SUM
- See Also:
- Constant Field Values
MODE
public static final int MODE
- See Also:
- Constant Field Values
MEDIAN
public static final int MEDIAN
- See Also:
- Constant Field Values
DEFAULT_IGNORE_MISSINGS
public static final boolean DEFAULT_IGNORE_MISSINGS
- See Also:
- Constant Field Values
ignoreMissings
protected boolean ignoreMissings
foundMissing
protected boolean foundMissing
AbstractAggregationFunction
public AbstractAggregationFunction()
AbstractAggregationFunction
public AbstractAggregationFunction(java.lang.Boolean ignoreMissings)
createAggregationFunction
public static AggregationFunction createAggregationFunction(java.lang.String functionName,
boolean ignoreMissings)
throws java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.ClassNotFoundException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException
- Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
createAggregationFunction
public static AggregationFunction createAggregationFunction(java.lang.String functionName)
throws java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.ClassNotFoundException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException
- Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
createAggregationFunction
public static AggregationFunction createAggregationFunction(int typeIndex,
boolean ignoreMissings)
throws java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException
- Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
createAggregationFunction
public static AggregationFunction createAggregationFunction(int typeIndex)
throws java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException
- Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
reset
protected abstract void reset()
- Reset the counters.
calculate
public double calculate(double[] values)
- Resets the counters and computes the aggregation function
solely based on the given values.
- Specified by:
calculate in interface AggregationFunction
calculate
public double calculate(double[] values,
double[] weights)
- Resets the counters and computes the aggregation function
solely based on the given values and the given weights.
- Specified by:
calculate in interface AggregationFunction
Copyright © 2001-2009 by Rapid-I