weka.classifiers.functions
Class RBFClassifier

java.lang.Object
  extended by weka.classifiers.AbstractClassifier
      extended by weka.classifiers.RandomizableClassifier
          extended by weka.classifiers.functions.RBFModel
              extended by weka.classifiers.functions.RBFClassifier
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Classifier, CapabilitiesHandler, OptionHandler, Randomizable, RevisionHandler

public class RBFClassifier
extends RBFModel

Class implementing radial basis function networks for classification, trained in a fully supervised manner using WEKA's Optimization class by minimizing squared error with the BFGS method. Note that all attributes are normalized into the [0,1] scale. The initial centers for the Gaussian radial basis functions are found using WEKA's SimpleKMeans. The initial sigma values are set to the maximum distance between any center and its nearest neighbour in the set of centers. There are several parameters. The ridge parameter is used to penalize the size of the weights in the output layer. The number of basis functions can also be specified. Note that large numbers produce long training times. Another option determines whether one global sigma value is used for all units (fastest), whether one value is used per unit (common practice, it seems, and set as the default), or a different value is learned for every unit/attribute combination. It is also possible to learn attribute weights for the distance function. (The square of the value shown in the output is used.) Finally, it is possible to use conjugate gradient descent rather than BFGS updates, which can be faster for cases with many parameters, and to use normalized basis functions instead of unnormalized ones. To improve speed, an approximate version of the logistic function is used as the activation function in the output layer. Also, if delta values in the backpropagation step are within the user-specified tolerance, the gradient is not updated for that particular instance, which saves some additional time. Paralled calculation of squared error and gradient is possible when multiple CPU cores are present. Data is split into batches and processed in separate threads in this case. Note that this only improves runtime for larger datasets. Nominal attributes are processed using the unsupervised NominalToBinary filter and missing values are replaced globally using ReplaceMissingValues.

Valid options are:

 -N <int>
  Number of Gaussian basis functions (default is 2).
 
 -R <double>
  Ridge factor for quadratic penalty on output weights (default is 0.01).
 
 -L <double>
  Tolerance parameter for delta values (default is 1.0e-6).
 
 -C <1|2|3>
  The scale optimization option: global scale (1), one scale per unit (2), scale per unit and attribute (3) (default is 2).
 
 -G
  Use conjugate gradient descent (recommended for many attributes).
 
 -O
  Use normalized basis functions.
 
 -A
  Use attribute weights.
 
 -P <int>
  The size of the thread pool, for example, the number of cores in the CPU. (default 1)
 
 -E <int>
  The number of threads to use, which should be >= size of thread pool. (default 1)
 
 -S <num>
  Random number seed.
  (default 1)
 -D
  If set, classifier is run in debug mode and
  may output additional info to the console

Version:
$Revision: 9402 $
Author:
Eibe Frank (eibe@cs.waikato.ac.nz)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class weka.classifiers.functions.RBFModel
TAGS_SCALE, USE_GLOBAL_SCALE, USE_SCALE_PER_UNIT, USE_SCALE_PER_UNIT_AND_ATTRIBUTE
 
Constructor Summary
RBFClassifier()
           
 
Method Summary
 Capabilities getCapabilities()
          Returns default capabilities of the classifier.
static void main(java.lang.String[] argv)
          Main method to run the code from the command-line using the standard WEKA options.
 java.lang.String toString()
          Outputs the network as a string.
 
Methods inherited from class weka.classifiers.functions.RBFModel
buildClassifier, distributionForInstance, getNumFunctions, getNumThreads, getOptions, getPoolSize, getRidge, getScaleOptimizationOption, getTolerance, getUseAttributeWeights, getUseCGD, getUseNormalizedBasisFunctions, globalInfo, listOptions, numFunctionsTipText, numThreadsTipText, poolSizeTipText, ridgeTipText, scaleOptimizationOptionTipText, setNumFunctions, setNumThreads, setOptions, setPoolSize, setRidge, setScaleOptimizationOption, setTolerance, setUseAttributeWeights, setUseCGD, setUseNormalizedBasisFunctions, toleranceTipText, useAttributeWeightsTipText, useCGDTipText, useNormalizedBasisFunctionsTipText
 
Methods inherited from class weka.classifiers.RandomizableClassifier
getSeed, seedTipText, setSeed
 
Methods inherited from class weka.classifiers.AbstractClassifier
classifyInstance, debugTipText, forName, getDebug, getRevision, makeCopies, makeCopy, runClassifier, setDebug
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RBFClassifier

public RBFClassifier()
Method Detail

getCapabilities

public Capabilities getCapabilities()
Returns default capabilities of the classifier.

Specified by:
getCapabilities in interface Classifier
Specified by:
getCapabilities in interface CapabilitiesHandler
Overrides:
getCapabilities in class RBFModel
Returns:
the capabilities of this classifier

toString

public java.lang.String toString()
Outputs the network as a string.

Overrides:
toString in class java.lang.Object

main

public static void main(java.lang.String[] argv)
Main method to run the code from the command-line using the standard WEKA options.