proper.util
Class WekaHelper

java.lang.Object
  extended by proper.util.WekaHelper

public class WekaHelper
extends java.lang.Object

A little Helper class for handling WEKA stuff: creating Classifier instances, creating Filter instances, setting options...

Version:
$Revision: 1.2 $
Author:
FracPete

Constructor Summary
WekaHelper()
           
 
Method Summary
static weka.classifiers.Classifier getClassifierInstance(java.lang.String classname)
          returns an instance of a WEKA classifier from the given complete class name, can be NULL if it doesn't succeed
static weka.filters.Filter getFilterInstance(java.lang.String classname)
          returns an instance of a filter specified by the classname
static boolean setOptions(java.lang.Object obj, java.lang.String args)
          sets the options if the class supports the setting of options, i.e.
static boolean setOptions(java.lang.Object obj, java.lang.String[] args)
          sets the options if the class supports the setting of options, i.e.
static Cells toCells(weka.core.Instances instances)
          transfers the instances into a Cells object and returns that
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WekaHelper

public WekaHelper()
Method Detail

setOptions

public static boolean setOptions(java.lang.Object obj,
                                 java.lang.String args)
sets the options if the class supports the setting of options, i.e. it implements OptionHandler, returns TRUE if it succeeds

Returns:
TRUE if the options could be set

setOptions

public static boolean setOptions(java.lang.Object obj,
                                 java.lang.String[] args)
sets the options if the class supports the setting of options, i.e. it implements OptionHandler, returns TRUE if it succeeds

Returns:
TRUE if the options could be set

getClassifierInstance

public static weka.classifiers.Classifier getClassifierInstance(java.lang.String classname)
returns an instance of a WEKA classifier from the given complete class name, can be NULL if it doesn't succeed

Parameters:
classname - the filename of the classifier to instantiate
Returns:
an instance of the classifier

getFilterInstance

public static weka.filters.Filter getFilterInstance(java.lang.String classname)
returns an instance of a filter specified by the classname


toCells

public static Cells toCells(weka.core.Instances instances)
transfers the instances into a Cells object and returns that