|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance> de.lmu.ifi.dbs.elki.distance.similarityfunction.kernel.PolynomialKernelFunction
public class PolynomialKernelFunction
Provides a polynomial Kernel function that computes a similarity between the two feature vectors V1 and V2 defined by (V1^T*V2)^degree.
Nested Class Summary | |
---|---|
static class |
PolynomialKernelFunction.Parameterizer
Parameterization class. |
Field Summary | |
---|---|
static double |
DEFAULT_DEGREE
The default degree. |
private double |
degree
Degree of the polynomial kernel function |
static OptionID |
DEGREE_ID
Degree parameter |
Constructor Summary | |
---|---|
PolynomialKernelFunction(double degree)
Constructor. |
Method Summary | ||
---|---|---|
DoubleDistance |
distance(NumberVector<?,?> fv1,
NumberVector<?,?> fv2)
Computes the distance between two given DatabaseObjects according to this distance function. |
|
DoubleDistance |
getDistanceFactory()
Method to get the distance functions factory. |
|
VectorFieldTypeInformation<? super NumberVector<?,?>> |
getInputTypeRestriction()
Get the input data type of the function. |
|
|
instantiate(Relation<T> database)
Instantiate with a database to get the actual distance query. |
|
DoubleDistance |
similarity(NumberVector<?,?> o1,
NumberVector<?,?> o2)
Provides the linear kernel similarity between the given two vectors. |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPrimitiveDistanceFunction |
---|
isMetric, isSymmetric |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.similarityfunction.SimilarityFunction |
---|
isSymmetric |
Field Detail |
---|
public static final double DEFAULT_DEGREE
public static final OptionID DEGREE_ID
private double degree
Constructor Detail |
---|
public PolynomialKernelFunction(double degree)
degree
- Kernel degreeMethod Detail |
---|
public DoubleDistance similarity(NumberVector<?,?> o1, NumberVector<?,?> o2)
similarity
in interface PrimitiveSimilarityFunction<NumberVector<?,?>,DoubleDistance>
o1
- first vectoro2
- second vector
DoubleDistance
.public DoubleDistance distance(NumberVector<?,?> fv1, NumberVector<?,?> fv2)
PrimitiveDistanceFunction
distance
in interface PrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
distance
in class AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
fv1
- first DatabaseObjectfv2
- second DatabaseObject
public VectorFieldTypeInformation<? super NumberVector<?,?>> getInputTypeRestriction()
SimilarityFunction
getInputTypeRestriction
in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>
getInputTypeRestriction
in interface PrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
getInputTypeRestriction
in interface PrimitiveSimilarityFunction<NumberVector<?,?>,DoubleDistance>
getInputTypeRestriction
in interface SimilarityFunction<NumberVector<?,?>,DoubleDistance>
public DoubleDistance getDistanceFactory()
DistanceFunction
getDistanceFactory
in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>
getDistanceFactory
in interface SimilarityFunction<NumberVector<?,?>,DoubleDistance>
getDistanceFactory
in class AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
public <T extends NumberVector<?,?>> DistanceSimilarityQuery<T,DoubleDistance> instantiate(Relation<T> database)
AbstractPrimitiveDistanceFunction
instantiate
in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>
instantiate
in interface SimilarityFunction<NumberVector<?,?>,DoubleDistance>
instantiate
in class AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
database
- Representation
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |