org.knime.base.node.mine.svm.kernel
Class PolynomialKernel

java.lang.Object
  extended by org.knime.base.node.mine.svm.kernel.PolynomialKernel
All Implemented Interfaces:
Kernel

public class PolynomialKernel
extends Object
implements Kernel

Polynomial kernel of the form: (x * y + bias) ^ power.

Author:
Stefan Ciobaca, University of Konstanz, Nicolas Cebron, University of Konstanz

Constructor Summary
PolynomialKernel()
           
 
Method Summary
 boolean areValid(double[] params)
          test if the given combination of parameters is valid for this kernel.
 double evaluate(double[] a, double[] b)
          returns the value of the kernel given vectors a and b.
 double evaluate(DoubleVector a, DoubleVector b)
          evaluate the kernel.
 double getDefaultParameter(int index)
          return the default parameter at the given index.
 int getNumberParameters()
          2 parameters (bias and power).
 double getParameter(int index)
          return the given parameter.
 String getParameterName(int index)
          get the names of the 2 parameters.
 KernelFactory.KernelType getType()
          
 void setParameter(int index, double value)
          sets the given parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolynomialKernel

public PolynomialKernel()
Method Detail

evaluate

public double evaluate(DoubleVector a,
                       DoubleVector b)
evaluate the kernel.

Specified by:
evaluate in interface Kernel
Parameters:
a - first vector
b - second vector
Returns:
the result
See Also:
DoubleVector

evaluate

public double evaluate(double[] a,
                       double[] b)
returns the value of the kernel given vectors a and b.

Specified by:
evaluate in interface Kernel
Parameters:
a - the first vector
b - the second vector
Returns:
the result of the kernel in a and b

getNumberParameters

public int getNumberParameters()
2 parameters (bias and power).

Specified by:
getNumberParameters in interface Kernel
Returns:
2
See Also:
Kernel.getNumberParameters()

getParameterName

public String getParameterName(int index)
get the names of the 2 parameters.

Specified by:
getParameterName in interface Kernel
Parameters:
index - first or second parameter?
Returns:
the name of the parameter
See Also:
Kernel.getParameterName(int)

areValid

public boolean areValid(double[] params)
Description copied from interface: Kernel
test if the given combination of parameters is valid for this kernel.

Specified by:
areValid in interface Kernel
Parameters:
params - the bias and power
Returns:
validity
See Also:
Kernel.areValid(double[])

setParameter

public void setParameter(int index,
                         double value)
Description copied from interface: Kernel
sets the given parameter.

Specified by:
setParameter in interface Kernel
Parameters:
index - first or second
value - which value
See Also:
Kernel.setParameter(int, double)

getDefaultParameter

public double getDefaultParameter(int index)
return the default parameter at the given index. index must be between 0 and getNumberParameters() - 1.

Specified by:
getDefaultParameter in interface Kernel
Parameters:
index - the parameter index.
Returns:
the parameter's default value

getParameter

public double getParameter(int index)
return the given parameter.

Specified by:
getParameter in interface Kernel
Parameters:
index - first or second?
Returns:
value of kernel parameter
See Also:
Kernel.getParameter(int)

getType

public KernelFactory.KernelType getType()

Specified by:
getType in interface Kernel
Returns:
the KernelFactory.KernelType of the Kernel


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.