libsvm
Class Kernel

java.lang.Object
  extended by libsvm.QMatrix
      extended by libsvm.Kernel
Direct Known Subclasses:
ONE_CLASS_Q, SVC_Q, SVR_Q

abstract class Kernel
extends QMatrix


Field Summary
private  double coef0
           
private  int degree
           
private  FeatureRepresentation fr
           
private  double gamma
           
private  int kernel_type
           
private  boolean useExpectedValues
           
private  svm_node[][] x
           
private  double[] x_square
           
 
Constructor Summary
Kernel(int l, svm_node[][] x_, svm_parameter param)
           
 
Method Summary
(package private) static double dot(svm_node[] x, svm_node[] y, FeatureRepresentation fr, boolean useExpectedValues)
           
(package private) abstract  float[] get_Q(int column, int len)
           
(package private) abstract  float[] get_QD()
           
(package private) static double k_function(svm_node[] x, svm_node[] y, svm_parameter param)
           
(package private)  double kernel_function(int i)
           
(package private)  double kernel_function(int i, int j)
           
private static double powi(double base, int times)
           
(package private)  void swap_index(int i, int j)
           
private static double tanh(double x)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

private svm_node[][] x

x_square

private final double[] x_square

kernel_type

private final int kernel_type

degree

private final int degree

gamma

private final double gamma

coef0

private final double coef0

fr

private final FeatureRepresentation fr

useExpectedValues

private final boolean useExpectedValues
Constructor Detail

Kernel

Kernel(int l,
       svm_node[][] x_,
       svm_parameter param)
Method Detail

get_Q

abstract float[] get_Q(int column,
                       int len)
Specified by:
get_Q in class QMatrix

get_QD

abstract float[] get_QD()
Specified by:
get_QD in class QMatrix

swap_index

void swap_index(int i,
                int j)
Specified by:
swap_index in class QMatrix

powi

private static double powi(double base,
                           int times)

tanh

private static double tanh(double x)

kernel_function

double kernel_function(int i,
                       int j)

kernel_function

double kernel_function(int i)

dot

static double dot(svm_node[] x,
                  svm_node[] y,
                  FeatureRepresentation fr,
                  boolean useExpectedValues)

k_function

static double k_function(svm_node[] x,
                         svm_node[] y,
                         svm_parameter param)