fr.lip6.kernel
Class LinearKernel<T extends MLVector<?>>

java.lang.Object
  extended by fr.lip6.kernel.Kernel<T>
      extended by fr.lip6.kernel.LinearKernel<T>
Type Parameters:
T - type of vectors the kernel must work with
All Implemented Interfaces:
java.io.Serializable

public class LinearKernel<T extends MLVector<?>>
extends Kernel<T>

Simplest kernel equivalent to a dot product that works for any types of vectors (FloatVectors, ByteVectors, etc).

Author:
dpicard
See Also:
Serialized Form

Constructor Summary
LinearKernel()
           
 
Method Summary
 double valueOf(T t1)
          kernel similarity to zero
 double valueOf(T t1, T t2)
          compute the kernel similarity between two element of input space
 
Methods inherited from class fr.lip6.kernel.Kernel
NormalizedValueOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearKernel

public LinearKernel()
Method Detail

valueOf

public double valueOf(T t1,
                      T t2)
Description copied from class: Kernel
compute the kernel similarity between two element of input space

Specified by:
valueOf in class Kernel<T extends MLVector<?>>
Parameters:
t1 - first element
t2 - second element
Returns:
the kernel value

valueOf

public double valueOf(T t1)
Description copied from class: Kernel
kernel similarity to zero

Specified by:
valueOf in class Kernel<T extends MLVector<?>>
Parameters:
t1 - the element to compute the similarity to zero