fr.lip6.bag.kernel
Class PowerBagKernel<V extends MLVector<?>,B extends BagOfVector<V>>

java.lang.Object
  extended by fr.lip6.kernel.Kernel<B>
      extended by fr.lip6.bag.kernel.PowerBagKernel<V,B>
Type Parameters:
V - type of vectors
B - type of bags
All Implemented Interfaces:
java.io.Serializable

public class PowerBagKernel<V extends MLVector<?>,B extends BagOfVector<V>>
extends Kernel<B>

Power kernel on bags :
K(Bi,Bj) = sum(sum(k(bri,bsj)^q))^(1/q)

Author:
dpicard
See Also:
Serialized Form

Constructor Summary
PowerBagKernel(Kernel<V> minorKernel, double power)
          Constructor by kernel and power.
 
Method Summary
 double valueOf(B t1)
          kernel similarity to zero
 double valueOf(B t1, B 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

PowerBagKernel

public PowerBagKernel(Kernel<V> minorKernel,
                      double power)
Constructor by kernel and power.

Parameters:
minorKernel - the kernel used for similarities between vectors
power - q parameter
Method Detail

valueOf

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

Specified by:
valueOf in class Kernel<B extends BagOfVector<V>>
Parameters:
t1 - first element
t2 - second element
Returns:
the kernel value

valueOf

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

Specified by:
valueOf in class Kernel<B extends BagOfVector<V>>
Parameters:
t1 - the element to compute the similarity to zero