org.biojava.stats.svm
Class ListSumKernel

java.lang.Object
  extended by org.biojava.stats.svm.NestedKernel
      extended by org.biojava.stats.svm.ListSumKernel
All Implemented Interfaces:
java.io.Serializable, SVMKernel

public class ListSumKernel
extends NestedKernel

This kernel computes the sum of the dot products between items of two lists at corresponding indexes. We define k(x, null) to be zero for when list elements are null.

Author:
Matthew Pocock
See Also:
Serialized Form

Constructor Summary
ListSumKernel()
           
 
Method Summary
 double evaluate(java.lang.Object a, java.lang.Object b)
          Return the dot product of two vectors in an arbitrary feature space.
 java.lang.String toString()
           
 
Methods inherited from class org.biojava.stats.svm.NestedKernel
getNestedKernel, setNestedKernel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ListSumKernel

public ListSumKernel()
Method Detail

evaluate

public double evaluate(java.lang.Object a,
                       java.lang.Object b)
Description copied from interface: SVMKernel
Return the dot product of two vectors in an arbitrary feature space. In this implementation, the `vectors' can actually be arbitrary objects.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object