Module datarush.analytics
Interface AggregationFunction
-
- All Known Implementing Classes:
AggregationFunctionConstants
public interface AggregationFunctionInterface for aggregation functions computing distance/similarity of two vectors according to the PMML specification.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doubleapply(CompareFunction[] compareFunctions, double[] cluster, double[] data, double[] fieldWeights, double[] missingValueWeights, double[] similarityScales, double pParameter)Applies thisAggregationFunction.booleanis(ComparisonMeasure.Kind kind)Gets whether the passedComparisonMeasure.Kindis equal to theComparisonMeasure.Kindof this function;Stringname()Get the name of this function.
-
-
-
Method Detail
-
apply
double apply(CompareFunction[] compareFunctions, double[] cluster, double[] data, double[] fieldWeights, double[] missingValueWeights, double[] similarityScales, double pParameter)
Applies thisAggregationFunction. Computes the distance/similarity of two vectors. Compare function, field weights, missing value weights and similarity scales at index i must correspond to cluster and data vector values at the same index.- Parameters:
compareFunctions- theCompareFunctions to measure distance/similarity between the vectorscluster- the cluster seedsdata- the data vectorfieldWeights- field weights for each field/its valuesmissingValueWeights- missing value weights for each field/its valuessimilarityScales- similarity scales for each field/its valuespParameter- the p-parameter, only used by the Minkowski function- Returns:
- the aggregation value computed by this function
-
name
String name()
Get the name of this function.
-
is
boolean is(ComparisonMeasure.Kind kind)
Gets whether the passedComparisonMeasure.Kindis equal to theComparisonMeasure.Kindof this function;- Parameters:
kind-ComparisonMeasure.Kindto be compared with- Returns:
- true if the provided
ComparisonMeasure.Kindis equals to theComparisonMeasure.Kindof this function
-
-