databionics.esom.train
Class BestMatchHit

java.lang.Object
  extended by databionics.esom.train.BestMatchHit

public class BestMatchHit
extends java.lang.Object

Represent the projection of one ore more data vectors on a best match. Keeps a running sum of the data vectors and can return the mean vector for updating.

Author:
Mario, Fabian

Field Summary
protected  cern.colt.list.IntArrayList classList
           
protected  int hitCount
          counter for hits on neuron
protected static int sameHits
          counter for BestMatchHits
protected  cern.colt.matrix.DoubleMatrix1D sum
          sum of prjected data vectors
 
Constructor Summary
BestMatchHit()
          standard constructor
BestMatchHit(cern.colt.matrix.DoubleMatrix1D vector)
          constructor for first hit
BestMatchHit(cern.colt.matrix.DoubleMatrix1D vector, int classnumber)
          constructor for first hit
 
Method Summary
 void add(cern.colt.matrix.DoubleMatrix1D vector)
          add a vector to the running sum
 void add(cern.colt.matrix.DoubleMatrix1D vector, int classnumber)
          add a vector to the running sum
 cern.colt.list.IntArrayList getClassList()
           
 int getHits()
          gives number of BestMatchHits
 cern.colt.matrix.DoubleMatrix1D getMean()
          Calculate the mean vector
 int getSameHits()
          gives the number of hits to neurons which are hit before
 void setClassList(cern.colt.list.IntArrayList classList)
           
 void setHits(int j)
          sets the number of hits, only used to set to zero
 void setSameHits(int j)
          sets the number of hits, only used to set to zero
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sameHits

protected static int sameHits
counter for BestMatchHits


hitCount

protected int hitCount
counter for hits on neuron


sum

protected cern.colt.matrix.DoubleMatrix1D sum
sum of prjected data vectors


classList

protected cern.colt.list.IntArrayList classList
Constructor Detail

BestMatchHit

public BestMatchHit()
standard constructor


BestMatchHit

public BestMatchHit(cern.colt.matrix.DoubleMatrix1D vector)
constructor for first hit

Parameters:
vector - vector to add

BestMatchHit

public BestMatchHit(cern.colt.matrix.DoubleMatrix1D vector,
                    int classnumber)
constructor for first hit

Parameters:
vector - vector to add
Method Detail

add

public void add(cern.colt.matrix.DoubleMatrix1D vector,
                int classnumber)
add a vector to the running sum

Parameters:
vector - vector to add

add

public void add(cern.colt.matrix.DoubleMatrix1D vector)
add a vector to the running sum

Parameters:
vector - vector to add

getMean

public cern.colt.matrix.DoubleMatrix1D getMean()
Calculate the mean vector


getHits

public int getHits()
gives number of BestMatchHits

Returns:
number of hits

setHits

public void setHits(int j)
sets the number of hits, only used to set to zero

Parameters:
j - number to set to

getSameHits

public int getSameHits()
gives the number of hits to neurons which are hit before

Returns:
number of hits

setSameHits

public void setSameHits(int j)
sets the number of hits, only used to set to zero

Parameters:
j - number to set to

getClassList

public cern.colt.list.IntArrayList getClassList()
Returns:
Returns the classList.

setClassList

public void setClassList(cern.colt.list.IntArrayList classList)
Parameters:
classList - The classList to set.


Copyright © 2005-2006 Databionics Research Group. All Rights Reserved.