|
||||||||||
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.similarityfunction.AbstractPrimitiveSimilarityFunction<O,DoubleDistance> de.lmu.ifi.dbs.elki.distance.similarityfunction.kernel.LinearKernelFunction<O>
O
- vector typepublic class LinearKernelFunction<O extends NumberVector<?,?>>
Provides a linear Kernel function that computes a similarity between the two feature vectors V1 and V2 defined by V1^T*V2.
Constructor Summary | |
---|---|
LinearKernelFunction()
Provides a linear Kernel function that computes a similarity between the two vectors V1 and V2 defined by V1^T*V2. |
Method Summary | ||
---|---|---|
DoubleDistance |
distance(O fv1,
O fv2)
Computes the distance between two given DatabaseObjects according to this distance function. |
|
DoubleDistance |
getDistanceFactory()
Method to get the distance functions factory. |
|
VectorFieldTypeInformation<? super O> |
getInputTypeRestriction()
Get the input data type of the function. |
|
|
instantiate(Relation<T> database)
Instantiate with a representation to get the actual similarity query. |
|
boolean |
isMetric()
Is this distance function metric (in particular, does it satisfy the triangle equation?) |
|
DoubleDistance |
similarity(O o1,
O o2)
Provides a linear Kernel function that computes a similarity between the two feature vectors V1 and V2 definded by V1^T*V2 |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.similarityfunction.AbstractPrimitiveSimilarityFunction |
---|
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.distancefunction.DistanceFunction |
---|
isSymmetric |
Constructor Detail |
---|
public LinearKernelFunction()
Method Detail |
---|
public DoubleDistance similarity(O o1, O o2)
similarity
in interface PrimitiveSimilarityFunction<O extends NumberVector<?,?>,DoubleDistance>
similarity
in class AbstractPrimitiveSimilarityFunction<O extends NumberVector<?,?>,DoubleDistance>
o1
- first feature vectoro2
- second feature vector
DoubleDistance
.public DoubleDistance distance(O fv1, O fv2)
PrimitiveDistanceFunction
distance
in interface PrimitiveDistanceFunction<O extends NumberVector<?,?>,DoubleDistance>
fv1
- first DatabaseObjectfv2
- second DatabaseObject
public VectorFieldTypeInformation<? super O> getInputTypeRestriction()
SimilarityFunction
getInputTypeRestriction
in interface DistanceFunction<O extends NumberVector<?,?>,DoubleDistance>
getInputTypeRestriction
in interface PrimitiveDistanceFunction<O extends NumberVector<?,?>,DoubleDistance>
getInputTypeRestriction
in interface PrimitiveSimilarityFunction<O extends NumberVector<?,?>,DoubleDistance>
getInputTypeRestriction
in interface SimilarityFunction<O extends NumberVector<?,?>,DoubleDistance>
getInputTypeRestriction
in class AbstractPrimitiveSimilarityFunction<O extends NumberVector<?,?>,DoubleDistance>
public DoubleDistance getDistanceFactory()
DistanceFunction
getDistanceFactory
in interface DistanceFunction<O extends NumberVector<?,?>,DoubleDistance>
getDistanceFactory
in interface SimilarityFunction<O extends NumberVector<?,?>,DoubleDistance>
public boolean isMetric()
DistanceFunction
isMetric
in interface DistanceFunction<O extends NumberVector<?,?>,DoubleDistance>
true
when metric.public <T extends O> DistanceSimilarityQuery<T,DoubleDistance> instantiate(Relation<T> database)
SimilarityFunction
instantiate
in interface DistanceFunction<O extends NumberVector<?,?>,DoubleDistance>
instantiate
in interface SimilarityFunction<O extends NumberVector<?,?>,DoubleDistance>
instantiate
in class AbstractPrimitiveSimilarityFunction<O extends NumberVector<?,?>,DoubleDistance>
database
- Representation to use
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |