databionics.esom.train
Class KBatchSOM

java.lang.Object
  extended by databionics.esom.train.SOM
      extended by databionics.esom.train.KBatchSOM

public class KBatchSOM
extends SOM

version of batch training, updates map every k-th epoch

Author:
nogger

Field Summary
protected  cern.colt.map.OpenIntObjectHashMap hashMap
          Hash map to connect bm index and bm hitcount
protected  int k
          parameter for k-batch training
protected static org.apache.log4j.Logger log
          interface to log4j system
 
Fields inherited from class databionics.esom.train.SOM
bestmatches, bmSearch, bmStat, bmStatNeeded, center, classes, count, data, descriptives, distanceFunction, distances, epoch, epochs, grid, initMethod, keys, lrn, neighborhood, neuron, nf, offline, oldBestmatches, online, pattern, permutation, permutations, permute, qerror, radius, radiusCooling, random, rate, rateCooling, saveEpoch, saveEpoches, savePrefix, saveUMatrix, view
 
Constructor Summary
KBatchSOM()
          Standard constructor
 
Method Summary
 void afterEpoch()
          Now, the neurons are updated.
 void afterUpdate(int index, int row)
          Store the data vector projected on this bestmatch in a BestMatchHit object.
 int getK()
           
 void setK(int k)
           
 void update(cern.colt.matrix.DoubleMatrix1D vector, int bm, int pos)
          Empty implementation.
 void updateNeighborhood(cern.colt.matrix.DoubleMatrix1D vector, int bm)
          Update a neuron and its neighborhood.
 
Methods inherited from class databionics.esom.train.SOM
beforeEpoch, beforeSearch, beforeUpdate, calcQerror, centerMap, cool, getBestMatches, getBmSearch, getData, getDescriptives, getDistance, getDistance, getDistanceFunction, getDistances, getEpochs, getGrid, getKeys, getNeighborhood, getNumberFormat, getOldBestmatches, getPattern, getPermutation, getPermute, getRadius, getRadiusCooling, getRateCooling, init, isBmStatNeeded, isCenter, loadCls, loadData, saveBestMatches, setBestMatches, setBestMatches, setBmSearch, setBmStatNeeded, setCenter, setData, setDistanceFunction, setDistances, setEpochs, setGrid, setInit, setKeys, setNeighborhood, setNumberFormat, setOldBestmatches, setOnline, setPermute, setRadiusCooling, setRateCooling, setSaveEpoch, setSaveEpochBoolean, setSavePrefix, setSaveUMatrix, stop, train, updateNeuron
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log
interface to log4j system


hashMap

protected cern.colt.map.OpenIntObjectHashMap hashMap
Hash map to connect bm index and bm hitcount


k

protected int k
parameter for k-batch training

Constructor Detail

KBatchSOM

public KBatchSOM()
Standard constructor

Method Detail

updateNeighborhood

public void updateNeighborhood(cern.colt.matrix.DoubleMatrix1D vector,
                               int bm)
Update a neuron and its neighborhood.

Overrides:
updateNeighborhood in class SOM
Parameters:
vector - vector of data
bm - index of bestmatching neuron

update

public void update(cern.colt.matrix.DoubleMatrix1D vector,
                   int bm,
                   int pos)
Empty implementation. Nothing to do in batch mode.

Specified by:
update in class SOM
Parameters:
vector - vector of data
bm - index of bestmatching neuron

afterUpdate

public void afterUpdate(int index,
                        int row)
Store the data vector projected on this bestmatch in a BestMatchHit object.

Overrides:
afterUpdate in class SOM
Parameters:
index - Index of neuron to be updated
row - Index of pattern in data

afterEpoch

public void afterEpoch()
Now, the neurons are updated.

Overrides:
afterEpoch in class SOM

getK

public int getK()
Returns:
Returns the k.

setK

public void setK(int k)
Parameters:
k - The k to set.


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