Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

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.FooKernelFunction<O>
Type Parameters:
O - vector type
All Implemented Interfaces:
DistanceFunction<O,DoubleDistance>, MeasurementFunction<O,DoubleDistance>, KernelFunction<O,DoubleDistance>, SimilarityFunction<O,DoubleDistance>, Parameterizable

public class FooKernelFunction<O extends NumberVector<?,?>>
extends AbstractKernelFunction<O,DoubleDistance>

Provides an experimental KernelDistanceFunction for NumberVectors. Currently only supports 2D data and x1^2 ~ x2 correlations.

Author:
Simon Paradies

Field Summary
static int DEFAULT_MAX_DEGREE
          The default max_degree.
private  int max_degree
          Degree of the polynomial kernel function
static OptionID MAX_DEGREE_ID
          OptionID for MAX_DEGREE_PARAM
private  IntParameter MAX_DEGREE_PARAM
          Parameter for the maximum degree
 
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
FooKernelFunction(Parameterization config)
          Constructor, adhering to Parameterizable
 
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 an experimental kernel similarity between the given two vectors.
 
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
 

Field Detail

DEFAULT_MAX_DEGREE

public static final int DEFAULT_MAX_DEGREE
The default max_degree.

See Also:
Constant Field Values

MAX_DEGREE_ID

public static final OptionID MAX_DEGREE_ID
OptionID for MAX_DEGREE_PARAM


MAX_DEGREE_PARAM

private final IntParameter MAX_DEGREE_PARAM
Parameter for the maximum degree


max_degree

private int max_degree
Degree of the polynomial kernel function

Constructor Detail

FooKernelFunction

public FooKernelFunction(Parameterization config)
Constructor, adhering to Parameterizable

Parameters:
config - Parameterization
Method Detail

similarity

public DoubleDistance similarity(O o1,
                                 O o2)
Provides an experimental kernel similarity between the given two vectors.

Parameters:
o1 - first vector
o2 - second vector
Returns:
the experimental 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)