Module datarush.analytics
Interface AggregationFunction
-
- All Known Implementing Classes:
AggregationFunctionConstants
public interface AggregationFunction
Interface 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 double
apply(CompareFunction[] compareFunctions, double[] cluster, double[] data, double[] fieldWeights, double[] missingValueWeights, double[] similarityScales, double pParameter)
Applies thisAggregationFunction
.boolean
is(ComparisonMeasure.Kind kind)
Gets whether the passedComparisonMeasure.Kind
is equal to theComparisonMeasure.Kind
of this function;String
name()
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
- theCompareFunction
s 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.Kind
is equal to theComparisonMeasure.Kind
of this function;- Parameters:
kind
-ComparisonMeasure.Kind
to be compared with- Returns:
- true if the provided
ComparisonMeasure.Kind
is equals to theComparisonMeasure.Kind
of this function
-
-