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 Detail

      • apply

        double apply​(CompareFunction[] compareFunctions,
                     double[] cluster,
                     double[] data,
                     double[] fieldWeights,
                     double[] missingValueWeights,
                     double[] similarityScales,
                     double pParameter)
        Applies this AggregationFunction. 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 - the CompareFunctions to measure distance/similarity between the vectors
        cluster - the cluster seeds
        data - the data vector
        fieldWeights - field weights for each field/its values
        missingValueWeights - missing value weights for each field/its values
        similarityScales - similarity scales for each field/its values
        pParameter - 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.