Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.distance.similarityfunction.kernel
Class LinearKernelFunction<O extends NumberVector<O,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction<O,D>
          extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction<O,D>
              extended by de.lmu.ifi.dbs.elki.distance.similarityfunction.kernel.AbstractKernelFunction<O,DoubleDistance>
                  extended by 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

Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction
distanceFactory
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug, logger
 
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 de.lmu.ifi.dbs.elki.distance.similarityfunction.kernel.AbstractKernelFunction
similarity, similarity
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction
distance, distance
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction
getDatabase, getDistanceFactory, infiniteDistance, nullDistance, setDatabase, undefinedDistance, valueOf
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning
 
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
distance, distance
 
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.MeasurementFunction
getDistanceFactory, infiniteDistance, nullDistance, setDatabase, undefinedDistance, valueOf
 

Constructor Detail

LinearKernelFunction

public LinearKernelFunction()
Provides a linear Kernel function that computes a similarity between the two vectors V1 and V2 defined by V1^T*V2.

Method Detail

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 vector
o2 - 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 DatabaseObject
fv2 - second DatabaseObject
Returns:
the distance between two given DatabaseObjects according to this distance function

Release 0.3 (2010-03-31_1612)