public enum AggregationFunctionConstants extends Enum<AggregationFunctionConstants> implements AggregationFunction
AggregationFunction
s
that correspond to the aggregation functions for clustering models in
the PMML specification.Enum Constant and Description |
---|
binarySimilarity |
chebychev |
cityBlock |
euclidean |
jaccard |
minkowski |
simpleMatching |
squaredEuclidean |
tanimoto |
Modifier and Type | Method and Description |
---|---|
double |
apply(CompareFunction[] compareFunctions,
double[] cluster,
double[] data,
double[] fieldWeights,
double[] missingValueWeights,
double[] similarityScales,
double pParameter)
Applies this
AggregationFunction . |
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.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
is, name
public static final AggregationFunctionConstants euclidean
public static final AggregationFunctionConstants squaredEuclidean
public static final AggregationFunctionConstants chebychev
public static final AggregationFunctionConstants cityBlock
public static final AggregationFunctionConstants minkowski
public static final AggregationFunctionConstants simpleMatching
public static final AggregationFunctionConstants jaccard
public static final AggregationFunctionConstants tanimoto
public static final AggregationFunctionConstants binarySimilarity
public static AggregationFunctionConstants[] values()
for (AggregationFunctionConstants c : AggregationFunctionConstants.values()) System.out.println(c);
public static AggregationFunctionConstants valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic double apply(CompareFunction[] compareFunctions, double[] cluster, double[] data, double[] fieldWeights, double[] missingValueWeights, double[] similarityScales, double pParameter)
AggregationFunction
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.apply
in interface AggregationFunction
compareFunctions
- the CompareFunction
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 functionCopyright © 2016 Actian Corporation. All rights reserved.