Enum Class AggregationFunctionConstants

java.lang.Object
java.lang.Enum<AggregationFunctionConstants>
com.pervasive.datarush.analytics.cluster.AggregationFunctionConstants
All Implemented Interfaces:
AggregationFunction, Serializable, Comparable<AggregationFunctionConstants>, java.lang.constant.Constable

public enum AggregationFunctionConstants extends Enum<AggregationFunctionConstants> implements AggregationFunction
This enumeration contains implementations of AggregationFunctions that correspond to the aggregation functions for clustering models in the PMML specification.
  • Enum Constant Details

  • Method Details

    • values

      public static AggregationFunctionConstants[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AggregationFunctionConstants valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • apply

      public double apply(CompareFunction[] compareFunctions, double[] cluster, double[] data, double[] fieldWeights, double[] missingValueWeights, double[] similarityScales, double pParameter)
      Description copied from interface: AggregationFunction
      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.
      Specified by:
      apply in interface AggregationFunction
      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