weka.classifiers.neural.lvq.model
Class CodebookVector

java.lang.Object
  extended by weka.classifiers.neural.lvq.model.CodebookVector
All Implemented Interfaces:
java.io.Serializable

public class CodebookVector
extends java.lang.Object
implements java.io.Serializable

Description: Represents a single codebook vector in an LVQ model A codebook vector is also called a prototype or an exemplar. It is a single node which represents a sign post in the state space of the training data
Copyright (c) Jason Brownlee 2004

Author:
Jason Brownlee
See Also:
Serialized Form

Constructor Summary
CodebookVector(int aCodebookId)
           
 
Method Summary
 void clearClassDistributions()
           
 double[] getAttributes()
          Return codebook vector's internal representation
 int getBmuCorrectCount()
           
 int getBmuIncorrectCount()
           
 int[] getClassHitDistribution()
           
 double getClassification()
          Return codebook vectors class assignmnet
 double getDistance()
          Get distance from data instance at a point in time
 int getId()
           
 double getIndividualLearningRate()
          codebook vectors individual learning rate
 boolean hasClassChanged()
           
 void initialise(double[] aAttributes, int aClassIndex, int aNumClasses)
           
 void resetBmuCounts()
           
 void setBmuHit(double aDistance, weka.core.Instance aInstance)
           
 void setClassification(double aClassificationValue)
           
 void setIndividualLearningRate(double lrate)
          Set the codebook vectors learning rate
 void setUseVoting(boolean useVoting)
           
 java.lang.String toString()
          String representation of this codebook vector
 double value(int aIndex)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CodebookVector

public CodebookVector(int aCodebookId)
Method Detail

setClassification

public void setClassification(double aClassificationValue)

initialise

public void initialise(double[] aAttributes,
                       int aClassIndex,
                       int aNumClasses)

toString

public java.lang.String toString()
String representation of this codebook vector

Overrides:
toString in class java.lang.Object
Returns:
String

getClassification

public double getClassification()
Return codebook vectors class assignmnet

Returns:

getDistance

public double getDistance()
Get distance from data instance at a point in time

Returns:

getAttributes

public double[] getAttributes()
Return codebook vector's internal representation

Returns:

getIndividualLearningRate

public double getIndividualLearningRate()
codebook vectors individual learning rate

Returns:

setIndividualLearningRate

public void setIndividualLearningRate(double lrate)
Set the codebook vectors learning rate

Parameters:
lrate -

value

public double value(int aIndex)

setBmuHit

public void setBmuHit(double aDistance,
                      weka.core.Instance aInstance)

resetBmuCounts

public void resetBmuCounts()

getBmuCorrectCount

public int getBmuCorrectCount()

getBmuIncorrectCount

public int getBmuIncorrectCount()

getId

public int getId()

getClassHitDistribution

public int[] getClassHitDistribution()

hasClassChanged

public boolean hasClassChanged()

setUseVoting

public void setUseVoting(boolean useVoting)

clearClassDistributions

public void clearClassDistributions()