com.rapidminer.operator.clustering.clusterer
Class SVClusteringAlgorithm

java.lang.Object
  extended by com.rapidminer.operator.clustering.clusterer.SVClusteringAlgorithm
All Implemented Interfaces:
SVMInterface

public class SVClusteringAlgorithm
extends java.lang.Object
implements SVMInterface

SVClustering.

Author:
Stefan Rueping, Ingo Mierswa

Field Summary
protected  int[] at_bound
           
protected  double C
           
protected  double convergence_epsilon
           
protected  double descend
           
protected  SVCExampleSet examples
           
protected  int examples_total
           
protected  double feasible_epsilon
           
protected  double is_zero
           
protected  double[] K
           
protected  Kernel kernel
           
protected  double lambda_eq
           
protected  double lambda_factor
           
protected  double lambda_WS
           
protected  int parameters_working_set_size
           
protected  double[] primal
           
protected  QuadraticProblem qp
           
protected  int shrink_const
           
protected  double[] sum
           
protected  double sum_alpha
           
protected  int target_count
           
protected  int to_shrink
           
protected  int[] working_set
           
protected  int working_set_size
           
 
Constructor Summary
SVClusteringAlgorithm()
           
SVClusteringAlgorithm(Operator paramOperator, Kernel new_kernel, SVCExampleSet new_examples)
           
 
Method Summary
protected  void calculate_working_set()
          Calculates the working set
protected  void check()
          check internal variables, for debugging only
protected  boolean convergence()
          Checks if the optimization converged
protected  void exit_optimizer()
          exit the optimizer
protected  boolean feasible(int i)
           
 double getB()
          Returns the value of b.
 double getR()
          Returns the value of R.
 double[] getWeights()
          Returns the weights of all features.
protected  void init_optimizer()
          init the optimizer
protected  void init_working_set()
          Initialises the working set
 void init(Kernel new_kernel, SVCExampleSet new_examples)
           
 void init(Kernel kernel_, SVMExamples examples_)
          Initializes this SVM.
protected  double lambda(int i)
          lagrangian multiplier of variable i
protected  void logln(int level, java.lang.String message)
          log the output plus newline
protected  double nabla(int i)
           
protected  void optimize()
          Calls the optimizer
 double predict(SVMExample sVMExample)
          predict a single example
 void predict(SVMExamples to_predict)
          predict values on the testset with model
protected  void print_statistics()
          print statistics about result
protected  void project_to_constraint()
          Project variables to constraints
protected  void put_optimizer_values()
          Stores the optimizer results
protected  void reset_shrinked()
          reset the shrinked variables
protected  void shrink()
          shrink the variables
 void train()
          Train the SVM
protected  void update_working_set()
          Updates the working set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kernel

protected Kernel kernel

examples

protected SVCExampleSet examples

examples_total

protected int examples_total

target_count

protected int target_count

convergence_epsilon

protected double convergence_epsilon

lambda_factor

protected double lambda_factor

at_bound

protected int[] at_bound

sum

protected double[] sum

K

protected double[] K

working_set

protected int[] working_set

primal

protected double[] primal

sum_alpha

protected double sum_alpha

lambda_eq

protected double lambda_eq

to_shrink

protected int to_shrink

feasible_epsilon

protected double feasible_epsilon

lambda_WS

protected double lambda_WS

working_set_size

protected int working_set_size

parameters_working_set_size

protected int parameters_working_set_size

is_zero

protected double is_zero

shrink_const

protected int shrink_const

C

protected double C

descend

protected double descend

qp

protected QuadraticProblem qp
Constructor Detail

SVClusteringAlgorithm

public SVClusteringAlgorithm()

SVClusteringAlgorithm

public SVClusteringAlgorithm(Operator paramOperator,
                             Kernel new_kernel,
                             SVCExampleSet new_examples)
                      throws UndefinedParameterError
Throws:
UndefinedParameterError
Method Detail

init

public void init(Kernel new_kernel,
                 SVCExampleSet new_examples)

train

public void train()
Train the SVM

Specified by:
train in interface SVMInterface

print_statistics

protected void print_statistics()
print statistics about result


getB

public double getB()
Returns the value of b.

Specified by:
getB in interface SVMInterface

getR

public double getR()
Returns the value of R.


init_optimizer

protected void init_optimizer()
init the optimizer


exit_optimizer

protected void exit_optimizer()
exit the optimizer


shrink

protected void shrink()
shrink the variables


reset_shrinked

protected void reset_shrinked()
reset the shrinked variables


project_to_constraint

protected void project_to_constraint()
Project variables to constraints


calculate_working_set

protected void calculate_working_set()
Calculates the working set

Throws:
java.lang.Exception - on any error

update_working_set

protected void update_working_set()
Updates the working set


init_working_set

protected void init_working_set()
Initialises the working set

Throws:
java.lang.Exception - on any error

optimize

protected void optimize()
Calls the optimizer


put_optimizer_values

protected void put_optimizer_values()
Stores the optimizer results


convergence

protected boolean convergence()
Checks if the optimization converged

Returns:
boolean true optimzation if converged

nabla

protected final double nabla(int i)

lambda

protected double lambda(int i)
lagrangian multiplier of variable i

Parameters:
i - variable index
Returns:
lambda

feasible

protected boolean feasible(int i)

logln

protected void logln(int level,
                     java.lang.String message)
log the output plus newline

Parameters:
level - warning level
message - Message test

predict

public void predict(SVMExamples to_predict)
predict values on the testset with model

Specified by:
predict in interface SVMInterface

predict

public double predict(SVMExample sVMExample)
predict a single example

Specified by:
predict in interface SVMInterface

check

protected void check()
check internal variables, for debugging only


getWeights

public double[] getWeights()
Description copied from interface: SVMInterface
Returns the weights of all features.

Specified by:
getWeights in interface SVMInterface

init

public void init(Kernel kernel_,
                 SVMExamples examples_)
Description copied from interface: SVMInterface
Initializes this SVM.

Specified by:
init in interface SVMInterface


Copyright © 2001-2009 by Rapid-I