databionics.esom.train
Class HybridBatchSOM

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

public class HybridBatchSOM
extends SOM

batch version, which goes online, if too many same hits are realized

Author:
Mario Noecker

Field Summary
protected  int h
           
protected  cern.colt.map.OpenIntObjectHashMap hashMap
          Hash map to connect bm index and bm hitcount
protected  int hitcounter
           
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
HybridBatchSOM()
          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.
 void setH(int h)
           
 void setOffline(boolean offline)
           
 void setOnline(boolean online)
           
 void update(cern.colt.matrix.DoubleMatrix1D vector, int bm, int pos)
          if threshold is reached, go online
 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, 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


hitcounter

protected int hitcounter

h

protected int h
Constructor Detail

HybridBatchSOM

public HybridBatchSOM()
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)
if threshold is reached, go online

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

setOffline

public void setOffline(boolean offline)
Parameters:
offline - The offline to set.

setOnline

public void setOnline(boolean online)
Overrides:
setOnline in class SOM
Parameters:
online - The online to set.

setH

public void setH(int h)
Parameters:
boThreshold - The boThreshold to set.


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