weka.classifiers.neural.lvq
Class HierarchalLvq

java.lang.Object
  extended by weka.classifiers.Classifier
      extended by weka.classifiers.neural.lvq.HierarchalLvq
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, weka.core.OptionHandler, weka.core.WeightedInstancesHandler

public class HierarchalLvq
extends weka.classifiers.Classifier
implements weka.core.OptionHandler, weka.core.WeightedInstancesHandler

Date: 22/05/2004 File: HierarchalLVQ.java

Author:
Jason Brownlee
See Also:
Serialized Form

Constructor Summary
HierarchalLvq()
           
 
Method Summary
 java.lang.String baseLVQAlgorithmTipText()
           
 void buildClassifier(weka.core.Instances instances)
          Build a model of the provided training dataset using the specific LVQ algorithm implementation.
 double[] distributionForInstance(weka.core.Instance instance)
          Calcualte the class distribution for the provided instance
 java.lang.String errorPercentageTipText()
           
 weka.classifiers.Classifier getBaseLVQAlgorithm()
           
 double getErrorPercentage()
           
 double getHitPercentage()
           
 java.lang.String[] getOptions()
           
 weka.classifiers.Classifier getSubModelAlgorithm()
           
 java.lang.String globalInfo()
           
 java.lang.String hitPercentageTipText()
           
 java.util.Enumeration listOptions()
           
static void main(java.lang.String[] args)
          Entry point into the algorithm for direct usage
 void setBaseLVQAlgorithm(weka.classifiers.Classifier aClassifier)
           
 void setErrorPercentage(double aPercentage)
           
 void setHitPercentage(double aPercentage)
           
 void setOptions(java.lang.String[] options)
           
 void setSubModelAlgorithm(weka.classifiers.Classifier aClassifier)
           
 java.lang.String subModelAlgorithmTipText()
           
 java.lang.String toString()
           
 
Methods inherited from class weka.classifiers.Classifier
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HierarchalLvq

public HierarchalLvq()
Method Detail

distributionForInstance

public double[] distributionForInstance(weka.core.Instance instance)
                                 throws java.lang.Exception
Calcualte the class distribution for the provided instance

Overrides:
distributionForInstance in class weka.classifiers.Classifier
Parameters:
instance - - an instance to calculate the class distribution for
Returns:
double [] - class distribution for instance - all values are 0, exception for the index of the predicted class, which has the value of 1
Throws:
java.lang.Exception

buildClassifier

public void buildClassifier(weka.core.Instances instances)
                     throws java.lang.Exception
Build a model of the provided training dataset using the specific LVQ algorithm implementation. The model is constructed (if not already provided), it is initialised, then the model is trained (constructed) using the specific implementation of the LVQ algorithm by calling prepareLVQClassifier()

Specified by:
buildClassifier in class weka.classifiers.Classifier
Parameters:
instances - - training dataset.
Throws:
java.lang.Exception

listOptions

public java.util.Enumeration listOptions()
Specified by:
listOptions in interface weka.core.OptionHandler
Overrides:
listOptions in class weka.classifiers.Classifier

setOptions

public void setOptions(java.lang.String[] options)
                throws java.lang.Exception
Specified by:
setOptions in interface weka.core.OptionHandler
Overrides:
setOptions in class weka.classifiers.Classifier
Throws:
java.lang.Exception

getOptions

public java.lang.String[] getOptions()
Specified by:
getOptions in interface weka.core.OptionHandler
Overrides:
getOptions in class weka.classifiers.Classifier

globalInfo

public java.lang.String globalInfo()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setBaseLVQAlgorithm

public void setBaseLVQAlgorithm(weka.classifiers.Classifier aClassifier)

getBaseLVQAlgorithm

public weka.classifiers.Classifier getBaseLVQAlgorithm()

setSubModelAlgorithm

public void setSubModelAlgorithm(weka.classifiers.Classifier aClassifier)

getSubModelAlgorithm

public weka.classifiers.Classifier getSubModelAlgorithm()

setErrorPercentage

public void setErrorPercentage(double aPercentage)

getErrorPercentage

public double getErrorPercentage()

setHitPercentage

public void setHitPercentage(double aPercentage)

getHitPercentage

public double getHitPercentage()

baseLVQAlgorithmTipText

public java.lang.String baseLVQAlgorithmTipText()

subModelAlgorithmTipText

public java.lang.String subModelAlgorithmTipText()

errorPercentageTipText

public java.lang.String errorPercentageTipText()

hitPercentageTipText

public java.lang.String hitPercentageTipText()

main

public static void main(java.lang.String[] args)
Entry point into the algorithm for direct usage

Parameters:
args -