de.lmu.ifi.dbs.elki.distance.similarityfunction.kernel
Class LinearKernelFunction<O extends NumberVector<O,?>>
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction<O,D>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction<O,D>
de.lmu.ifi.dbs.elki.distance.similarityfunction.kernel.AbstractKernelFunction<O,DoubleDistance>
de.lmu.ifi.dbs.elki.distance.similarityfunction.kernel.LinearKernelFunction<O>
- Type Parameters:
O
- vector type
- All Implemented Interfaces:
- DistanceFunction<O,DoubleDistance>, MeasurementFunction<O,DoubleDistance>, KernelFunction<O,DoubleDistance>, SimilarityFunction<O,DoubleDistance>, Parameterizable
public class LinearKernelFunction<O extends NumberVector<O,?>>
- extends AbstractKernelFunction<O,DoubleDistance>
Provides a linear Kernel function that computes a similarity between the two
feature vectors V1 and V2 defined by V1^T*V2.
- Author:
- Simon Paradies
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 |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinearKernelFunction
public LinearKernelFunction()
- Provides a linear Kernel function that computes a similarity between the
two vectors V1 and V2 defined by V1^T*V2.
similarity
public 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
- Parameters:
o1
- first feature vectoro2
- second feature vector
- Returns:
- the linear kernel similarity between the given two vectors as an
instance of
DoubleDistance
.
distance
public DoubleDistance distance(O fv1,
O fv2)
- Description copied from interface:
DistanceFunction
- Computes the distance between two given DatabaseObjects according to this
distance function.
- Parameters:
fv1
- first DatabaseObjectfv2
- second DatabaseObject
- Returns:
- the distance between two given DatabaseObjects according to this
distance function