public class GaussianKernel extends AbstractSymmetricSimilarityFunction
setParams(double...) takes in one
double argument which determines the exponent in the gaussian function.
This metric is symmetric.| Constructor and Description |
|---|
GaussianKernel() |
| Modifier and Type | Method and Description |
|---|---|
void |
setParams(double... params)
Sets the exponent weight of the gaussian kernel.
|
double |
sim(DoubleVector v1,
DoubleVector v2)
Returns the similarity between
v1 and v2. |
double |
sim(IntegerVector v1,
IntegerVector v2)
Returns the similarity between
v1 and v2. |
double |
sim(Vector v1,
Vector v2)
Returns the similarity between
v1 and v2. |
isSymmetricpublic void setParams(double... params)
setParams in interface SimilarityFunctionsetParams in class AbstractSymmetricSimilarityFunctionpublic double sim(DoubleVector v1, DoubleVector v2)
v1 and v2. If SimilarityFunction.isSymmetric() is false, the ordering does matter.public double sim(IntegerVector v1, IntegerVector v2)
v1 and v2. If SimilarityFunction.isSymmetric() is false, the ordering does matter.public double sim(Vector v1, Vector v2)
v1 and v2. If SimilarityFunction.isSymmetric() is false, the ordering does matter.Copyright © 2012. All Rights Reserved.