Module datarush.analytics
Enum AggregationFunctionConstants
- java.lang.Object
-
- java.lang.Enum<AggregationFunctionConstants>
-
- com.pervasive.datarush.analytics.cluster.AggregationFunctionConstants
-
- All Implemented Interfaces:
AggregationFunction
,Serializable
,Comparable<AggregationFunctionConstants>
public enum AggregationFunctionConstants extends Enum<AggregationFunctionConstants> implements AggregationFunction
This enumeration contains implementations ofAggregationFunction
s that correspond to the aggregation functions for clustering models in the PMML specification.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description binarySimilarity
chebychev
cityBlock
euclidean
jaccard
minkowski
simpleMatching
squaredEuclidean
tanimoto
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description double
apply(CompareFunction[] compareFunctions, double[] cluster, double[] data, double[] fieldWeights, double[] missingValueWeights, double[] similarityScales, double pParameter)
Applies thisAggregationFunction
.static AggregationFunctionConstants
valueOf(String name)
Returns the enum constant of this type with the specified name.static AggregationFunctionConstants[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface com.pervasive.datarush.analytics.cluster.AggregationFunction
is, name
-
-
-
-
Enum Constant Detail
-
euclidean
public static final AggregationFunctionConstants euclidean
-
squaredEuclidean
public static final AggregationFunctionConstants squaredEuclidean
-
chebychev
public static final AggregationFunctionConstants chebychev
-
cityBlock
public static final AggregationFunctionConstants cityBlock
-
minkowski
public static final AggregationFunctionConstants minkowski
-
simpleMatching
public static final AggregationFunctionConstants simpleMatching
-
jaccard
public static final AggregationFunctionConstants jaccard
-
tanimoto
public static final AggregationFunctionConstants tanimoto
-
binarySimilarity
public static final AggregationFunctionConstants binarySimilarity
-
-
Method Detail
-
values
public static AggregationFunctionConstants[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AggregationFunctionConstants c : AggregationFunctionConstants.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AggregationFunctionConstants valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- 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 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.- Specified by:
apply
in interfaceAggregationFunction
- 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
-
-