brain
Class ModuleDhan

java.lang.Object
  extended by brain.Module
      extended by brain.ModuleDhan
All Implemented Interfaces:
java.io.Serializable

public class ModuleDhan
extends Module
implements java.io.Serializable

The ModuleDhan module of the cognitive system (CS). All parameters for time development of activities and reservoirs are generally public. Exceptions are parameters which need additional computation or checks when changed.

See Also:
Serialized Form

Field Summary
 java.lang.String[] auxAssInputFileNameAllowedValues
          Determines the file names containing the associations.
 int auxInitialCliqueNumber
          The number of initial random clusters (all identical).
 int auxInitialCliqueSize
          The size of initial random clusters (all identical).
 double auxPrintTimeStepCountInterval
          Time-interval for output of data on file.
 double backwardMemGammaActAct
          Rate for active-to-active backward links to optimize.
 double backwardMemGammaActIna
          Rate for active-to-inactive backward links to optimize.
 double backwardMemGammaInaAct
          Rate for inactive-to-active backward links to optimize.
 double backwardMemGammaInaIna
          Rate for inactive-to-inactive backward links to optimize.
 double[] backwardMemMean
          The mean value of all backward links reaching a given site.
 double backwardMemOptRateActAct
          Target growth-rate-input for active-to-active backward input.
 double backwardMemOptRateActIna
          Target growth-rate-input for active-to-inactive backward input.
 double backwardMemOptRateInaAct
          Target growth-rate-input for inactive-to-active backward input.
 double backwardMemOptRateInaIna
          Target growth-rate-input for inactive-to-inactive backward input.
 double[] backwardMemStandDev
          The standard deviation of all backward links reaching a given site.
 double backwardMemXActive
          Critical activities level for a module-neuron to be considered active.
 double backwardMemXInactive
          Critical activities level for a module-neuron to be considered inactive.
 double defaultExcitatoryLinkStrength
          Standard strength of excitatory links
 double defaultInhibitoryLinkStrength
          Standard strength of inhibitory links
 double diffusiveModuleSignal
          Has a large value when the current clique is activated due to the influence of the incoming signal due to the backward connections.
 double diffusiveModuleSignalBackRateThreshold
          When the backrate is above this threshold, the diffusive (learning) signal is activated.
 double diffusiveModuleSignalCriticalValue
          When above this critical value, the diffusive (learning) signal activates generalized Hebbian learning for the backward links.
 double diffusiveModuleSignalRateDown
          Deactivation rate for the diffusive module (learning) signal.
 double diffusiveModuleSignalRateUp
          Activation rate for the diffusive module (learning) signal.
static int INTERNAL_LINK_TYPES_NUMBER
          The number of different link types in internalLinks[INTERNAL_LINK_TYPES][][].
static int LINK_EXCITATORY_LONGTERM
           
static int LINK_EXITATORY_SHORTTERM
           
static int LINK_INHIBITORY_LONGTERM
           
 double longTermMemCriticalX
          Critical presynaptic activities for long-term memory dynamics.
 double longTermMemGammaOpt
          Optimization-rate (long-term) for excitatory links
 double longTermMemMinStrength
          Mininal values for excitatory links
 double longTermMemOptRate
          Optimal growth rate -- central parameter for the working-point optimization.
static double nearlyActive
          Default value for nearly active reservoir/activities level.
static double nearlyInactive
          Default value for nearly empty reservoir/activities level.
 int nResFunctions
          Number of different parameter sets for the reservoir functions.
 double[] phiAuxFactor
          Auxiliary variable for a fast evaluation of the reservoir function.
 double[] phiAuxShift
          Auxiliary variable for a fast evaluation of the reservoir function.
 double phiGammaCoh
          Averaging-rate for the inhibitory reservoirs of the winning clique.
 double phiGammaDown
          Depletion-rate for the inhibitory reservoir.
 double phiGammaUp
          Growth-rate for the inhibitory reservoir.
 double[] phiInverseWidth
          Inverse of the reservoir-function width - internal variable.
 double phiXActive
          The reservoir depletes when the activities is bigger than `phiXActive'.
 double phiXInactive
          The reservoir growths when the activities is smaller than `phiXInactive'.
 double rateInhiWidth
          The total inhibitory contribution to the growth rates are normalized, with a width `rateInhiWidth' for the sigmoidal.
static int RES_FW_POST
           
static int RES_FW_PRE
           
static int RES_FZ_PRE
           
static int RES_GZ_PRE
           
 double shortTermMemCriticalX
          Critical activities strength for short-term memory to be activated.
 double shortTermMemGammaDown
          Depletion-rate for short-term synaptic plasticity.
 double shortTermMemGammaUp
          Activation-rate for short-term synaptic plasticity.
 double shortTermMemMaxStrength
          Maximal value for the short-term synaptic strength.
 double shortTermMemMinExtBias
          Minimal external stimulus-strength for short-term memory to be activated.
 double synchronizationStrength
          An effective measure (in [0,1]) of clique formation strength, interpreted as poor-man's synchronization.
 
Fields inherited from class brain.Module
activities, biases, changeListeners, elapsedTime, elapsedTimeSteps, forwardModules, receptors
 
Constructor Summary
ModuleDhan()
           
ModuleDhan(java.io.File cliquesFile)
           
 
Method Summary
 void addInternalLink(int i, int j, int t, double value)
           
 void afferentMemory(double timeDelta)
          Evaluates the synaptic plasticities for the backward links.
 void auxPrintResFunct()
          Auxiliary function, prints the reservoir functions to file, via the printing facility.
 void calculateOneTimeStep(double timeDelta)
          A single time step of the dynamics.
static java.util.List<java.util.List<java.lang.Integer>> cliquesToInteger(java.util.List<java.util.List<java.lang.String>> cliques)
           
static
<Type> java.util.Map<Type,java.util.Set<Type>>
cliquesToNetwork(java.util.List<java.util.List<Type>> cliques)
           
 void dataOutputToFile()
          Selects data for output on file and sends the print strings to the printing facility.
 void diffusiveControlSignals(double timeDelta)
          Updates the diffusive module control signals.
 double[] getAfferentRates()
           
 double getLink(int i, int j)
          Returns the value of a specific internal link.
 double getLink(int i, int j, int t)
          Returns the value of a specific internal link.
 java.lang.String getName()
          Returns the name specific to this module.
 double[] getPhiAuxFactor()
           
 double[] getPhiAuxShift()
           
 double[] getPhiCritical()
          Returns critical reservoir levels for the reservoir functions.
 double[] getPhiInverseWidth()
           
 double[] getPhiMinValue()
          Returns the minimal value for the reservoir functions.
 double[] getPhiWidth()
          Returns the reservoir function width.
 double getPhiXActive_xml()
           
 double getRateInhiWidth()
           
 double[] getRates()
           
 double[] getRatesActive()
           
 double[] getRatesInternal()
           
 double[] getRatesNegative()
           
 double[] getRatesPositive()
           
 double[] getReservoir()
           
 double getReservoir(int i)
          Returns the reservoir level of a given center.
 boolean isClique(int[] cluster)
          Checks whether the input `cluster' is a clique of module `module' which has to be of `ModuleDhan'-type.
static boolean isClique(ModuleDhan module, int[] cluster)
          Checks whether the input `cluster' is a clique of module `module' which has to be of `ModuleDhan'-type.
static java.util.List<java.util.List<java.lang.String>> loadCliques(java.io.File file)
           
 void longTermMemory(double timeDelta)
          Evaluates the long-term synaptic plasticities.
 void readCliques(java.io.File file)
          Reads associations in the form of cliques from file.
 double reservoirFunctions(double argument, int reservoirFunction)
          The reservoir functions.
 void reset()
           
 void setLink(int i, int j, double value)
          Sets the value of a specific internal link.
 void setLink(int i, int j, int t, double value)
          Sets the value of a specific internal link.
 void setPhiCritical(double[] _PhiCritical)
           
 void setPhiCritical(double phiCritical_in, int whichOne)
          Sets critical reservoir level for the reservoir functions.
 void setPhiMinValue(double[] _PhiMinValue)
           
 void setPhiMinValue(double argument, int reservoirFunction)
          Sets the minimal value for the reservoir functions.
 void setPhiWidth(double[] _PhiWidth)
           
 void setPhiWidth(double argument, int reservoirFunction)
          Sets the reservoir function width.
 void setRateInhiWidth(double rateInhiWidth_new)
           
 void setSize(int size)
          Sets the number of nodes.
 void shortTermMemory(double timeDelta)
          Evaluates the short-term synaptic plasticities.
 void statOutputToFile()
          Evaluates some statistical properties, like link-strength distribution, for output on file upon external call and sends the data to the printing facility.
 
Methods inherited from class brain.Module
addAfferentModule, addBias, addBias, addChangeListener, addForwardModule, addNeuron, addReceptor, createDotGraph, createGraphMLGraph, createTGFGraph, getActiveClique, getActivities, getActivity, getAfferentLink, getAfferentLinks, getAfferentModules, getBias, getBiases, getCliqueGraph, getCliques, getDegreeDistribution, getElapsedTime, getElapsedTimeSteps, getForwardModules, getLinkProbability, getLinks, getNeighbors, getNeighbors, getNodeDegree, getNodeDegrees, getNodeInDegree, getNodeInDegrees, getNodeOutDegree, getNodeOutDegrees, getPositiveLinkAverage, getReceptor, getReceptors, getSize, hasAfferentModule, hasForwardModule, notifyStateChanged, performOneTimeStep, removeAfferentModule, removeAfferentModules, removeChangeListener, removeForwardModule, removeForwardModules, removeNeuron, setActivities, setActivity, setAfferentLink, setAfferentLinks, setBias, setBias, setLink, setName, setPositiveLinkAverage, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RES_FW_POST

public static final int RES_FW_POST
See Also:
Constant Field Values

RES_FW_PRE

public static final int RES_FW_PRE
See Also:
Constant Field Values

RES_FZ_PRE

public static final int RES_FZ_PRE
See Also:
Constant Field Values

RES_GZ_PRE

public static final int RES_GZ_PRE
See Also:
Constant Field Values

LINK_EXCITATORY_LONGTERM

public static final int LINK_EXCITATORY_LONGTERM
See Also:
Constant Field Values

LINK_INHIBITORY_LONGTERM

public static final int LINK_INHIBITORY_LONGTERM
See Also:
Constant Field Values

LINK_EXITATORY_SHORTTERM

public static final int LINK_EXITATORY_SHORTTERM
See Also:
Constant Field Values

nearlyActive

public static double nearlyActive
Default value for nearly active reservoir/activities level.


nearlyInactive

public static double nearlyInactive
Default value for nearly empty reservoir/activities level.


INTERNAL_LINK_TYPES_NUMBER

public static final int INTERNAL_LINK_TYPES_NUMBER
The number of different link types in internalLinks[INTERNAL_LINK_TYPES][][].

See Also:
Constant Field Values

diffusiveModuleSignal

public double diffusiveModuleSignal
Has a large value when the current clique is activated due to the influence of the incoming signal due to the backward connections.


synchronizationStrength

public double synchronizationStrength
An effective measure (in [0,1]) of clique formation strength, interpreted as poor-man's synchronization.


defaultInhibitoryLinkStrength

public double defaultInhibitoryLinkStrength
Standard strength of inhibitory links


defaultExcitatoryLinkStrength

public double defaultExcitatoryLinkStrength
Standard strength of excitatory links


rateInhiWidth

public double rateInhiWidth
The total inhibitory contribution to the growth rates are normalized, with a width `rateInhiWidth' for the sigmoidal.


nResFunctions

public final int nResFunctions
Number of different parameter sets for the reservoir functions.

See Also:
Constant Field Values

phiXActive

public double phiXActive
The reservoir depletes when the activities is bigger than `phiXActive'.


phiXInactive

public double phiXInactive
The reservoir growths when the activities is smaller than `phiXInactive'.


phiGammaDown

public double phiGammaDown
Depletion-rate for the inhibitory reservoir.


phiGammaUp

public double phiGammaUp
Growth-rate for the inhibitory reservoir.


phiGammaCoh

public double phiGammaCoh
Averaging-rate for the inhibitory reservoirs of the winning clique.


shortTermMemGammaDown

public double shortTermMemGammaDown
Depletion-rate for short-term synaptic plasticity.


shortTermMemGammaUp

public double shortTermMemGammaUp
Activation-rate for short-term synaptic plasticity.


shortTermMemMaxStrength

public double shortTermMemMaxStrength
Maximal value for the short-term synaptic strength.


shortTermMemCriticalX

public double shortTermMemCriticalX
Critical activities strength for short-term memory to be activated.


shortTermMemMinExtBias

public double shortTermMemMinExtBias
Minimal external stimulus-strength for short-term memory to be activated.


longTermMemGammaOpt

public double longTermMemGammaOpt
Optimization-rate (long-term) for excitatory links


longTermMemMinStrength

public double longTermMemMinStrength
Mininal values for excitatory links


longTermMemOptRate

public double longTermMemOptRate
Optimal growth rate -- central parameter for the working-point optimization.


longTermMemCriticalX

public double longTermMemCriticalX
Critical presynaptic activities for long-term memory dynamics.


diffusiveModuleSignalRateUp

public double diffusiveModuleSignalRateUp
Activation rate for the diffusive module (learning) signal.


diffusiveModuleSignalRateDown

public double diffusiveModuleSignalRateDown
Deactivation rate for the diffusive module (learning) signal.


diffusiveModuleSignalCriticalValue

public double diffusiveModuleSignalCriticalValue
When above this critical value, the diffusive (learning) signal activates generalized Hebbian learning for the backward links.


diffusiveModuleSignalBackRateThreshold

public double diffusiveModuleSignalBackRateThreshold
When the backrate is above this threshold, the diffusive (learning) signal is activated.


backwardMemXActive

public double backwardMemXActive
Critical activities level for a module-neuron to be considered active.


backwardMemXInactive

public double backwardMemXInactive
Critical activities level for a module-neuron to be considered inactive.


backwardMemGammaActAct

public double backwardMemGammaActAct
Rate for active-to-active backward links to optimize.


backwardMemGammaInaAct

public double backwardMemGammaInaAct
Rate for inactive-to-active backward links to optimize.


backwardMemGammaActIna

public double backwardMemGammaActIna
Rate for active-to-inactive backward links to optimize.


backwardMemGammaInaIna

public double backwardMemGammaInaIna
Rate for inactive-to-inactive backward links to optimize.


backwardMemOptRateActAct

public double backwardMemOptRateActAct
Target growth-rate-input for active-to-active backward input.


backwardMemOptRateInaAct

public double backwardMemOptRateInaAct
Target growth-rate-input for inactive-to-active backward input.


backwardMemOptRateActIna

public double backwardMemOptRateActIna
Target growth-rate-input for active-to-inactive backward input.


backwardMemOptRateInaIna

public double backwardMemOptRateInaIna
Target growth-rate-input for inactive-to-inactive backward input.


backwardMemMean

public double[] backwardMemMean
The mean value of all backward links reaching a given site.


backwardMemStandDev

public double[] backwardMemStandDev
The standard deviation of all backward links reaching a given site.


phiInverseWidth

public double[] phiInverseWidth
Inverse of the reservoir-function width - internal variable. For use for the reservoir functions.


phiAuxShift

public double[] phiAuxShift
Auxiliary variable for a fast evaluation of the reservoir function.


phiAuxFactor

public double[] phiAuxFactor
Auxiliary variable for a fast evaluation of the reservoir function.


auxInitialCliqueNumber

public int auxInitialCliqueNumber
The number of initial random clusters (all identical).


auxInitialCliqueSize

public int auxInitialCliqueSize
The size of initial random clusters (all identical).


auxPrintTimeStepCountInterval

public double auxPrintTimeStepCountInterval
Time-interval for output of data on file.


auxAssInputFileNameAllowedValues

public java.lang.String[] auxAssInputFileNameAllowedValues
Determines the file names containing the associations.

Constructor Detail

ModuleDhan

public ModuleDhan()
           throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

ModuleDhan

public ModuleDhan(java.io.File cliquesFile)
           throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException
Method Detail

reset

public void reset()
Overrides:
reset in class Module

getName

public java.lang.String getName()
Returns the name specific to this module.

Overrides:
getName in class Module

setSize

public void setSize(int size)
Sets the number of nodes.

Overrides:
setSize in class Module

getReservoir

public double getReservoir(int i)
Returns the reservoir level of a given center.


getLink

public double getLink(int i,
                      int j)
Returns the value of a specific internal link.

Overrides:
getLink in class Module
Returns:
link

getLink

public double getLink(int i,
                      int j,
                      int t)
Returns the value of a specific internal link.


setLink

public void setLink(int i,
                    int j,
                    double value)
Sets the value of a specific internal link.

Overrides:
setLink in class Module

setLink

public void setLink(int i,
                    int j,
                    int t,
                    double value)
Sets the value of a specific internal link.


addInternalLink

public void addInternalLink(int i,
                            int j,
                            int t,
                            double value)

getPhiCritical

public double[] getPhiCritical()
Returns critical reservoir levels for the reservoir functions.


setPhiCritical

public void setPhiCritical(double phiCritical_in,
                           int whichOne)
Sets critical reservoir level for the reservoir functions. The auxiliary variables
`inversePhiWidth' and
`inDiffPhi' and `constPoint'
are newly evaluated at the same time.


setPhiMinValue

public void setPhiMinValue(double[] _PhiMinValue)

setPhiWidth

public void setPhiWidth(double[] _PhiWidth)

setPhiCritical

public void setPhiCritical(double[] _PhiCritical)

getPhiWidth

public double[] getPhiWidth()
Returns the reservoir function width.


setPhiWidth

public void setPhiWidth(double argument,
                        int reservoirFunction)
Sets the reservoir function width. The auxiliary variables
`inversePhiWidth' and
`inDiffPhi' and `constPoint'
are newly evaluated at the same time.


getPhiMinValue

public double[] getPhiMinValue()
Returns the minimal value for the reservoir functions.

Returns:
result of the reservoir function

setPhiMinValue

public void setPhiMinValue(double argument,
                           int reservoirFunction)
Sets the minimal value for the reservoir functions. The auxiliary variables
`inversePhiWidth' and
`inDiffPhi' and `constPoint'
are newly evaluated at the same time.

Parameters:
argument - - the minimal value for phi
reservoirFunction - - the reservoir function

reservoirFunctions

public double reservoirFunctions(double argument,
                                 int reservoirFunction)
The reservoir functions. For a fast evaluation it uses the auxiliary variables
`phiInverseWidth[]', `phiCritical[]'
`phiAuxFactor[]' and `phiAuxShift[]'.

Parameters:
argument -
reservoirFunction - - whichOne: 0 =^= f_w^{post}(phi)
whichOne: 1 =^= f_w^{pre}(phi)
whichOne: 2 =^= f_z(phi)
Returns:
result of the reservoir function

loadCliques

public static java.util.List<java.util.List<java.lang.String>> loadCliques(java.io.File file)
                                                                    throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

cliquesToInteger

public static java.util.List<java.util.List<java.lang.Integer>> cliquesToInteger(java.util.List<java.util.List<java.lang.String>> cliques)

cliquesToNetwork

public static <Type> java.util.Map<Type,java.util.Set<Type>> cliquesToNetwork(java.util.List<java.util.List<Type>> cliques)

readCliques

public void readCliques(java.io.File file)
                 throws java.io.FileNotFoundException
Reads associations in the form of cliques from file.

--class ModuleDhan--
The link strength might be either set by hand, or from input. In both cases the link strength might be weighted be the number contributing cliques.
Normally the number of neurons is determined automatically on input and set.

Throws:
java.io.FileNotFoundException

calculateOneTimeStep

public void calculateOneTimeStep(double timeDelta)
A single time step of the dynamics.

--class ModuleDhan--
Uses the global variables time, deltaTime defined in Brain.

Specified by:
calculateOneTimeStep in class Module

diffusiveControlSignals

public void diffusiveControlSignals(double timeDelta)
Updates the diffusive module control signals.

--class ModuleDhan--


afferentMemory

public void afferentMemory(double timeDelta)
Evaluates the synaptic plasticities for the backward links.

--class ModuleDhan--


longTermMemory

public void longTermMemory(double timeDelta)
Evaluates the long-term synaptic plasticities.

--class ModuleDhan--


shortTermMemory

public void shortTermMemory(double timeDelta)
Evaluates the short-term synaptic plasticities.

--class ModuleDhan--


dataOutputToFile

public void dataOutputToFile()
Selects data for output on file and sends the print strings to the printing facility.

--class ModuleDhan--


statOutputToFile

public void statOutputToFile()
Evaluates some statistical properties, like link-strength distribution, for output on file upon external call and sends the data to the printing facility.

--class ModuleDhan--


auxPrintResFunct

public void auxPrintResFunct()
Auxiliary function, prints the reservoir functions to file, via the printing facility.

--class ModuleDhan--


getPhiXActive_xml

public double getPhiXActive_xml()

getRateInhiWidth

public double getRateInhiWidth()

setRateInhiWidth

public void setRateInhiWidth(double rateInhiWidth_new)

getRates

public double[] getRates()

getRatesInternal

public double[] getRatesInternal()

getReservoir

public double[] getReservoir()

getAfferentRates

public double[] getAfferentRates()

getRatesActive

public double[] getRatesActive()

getRatesPositive

public double[] getRatesPositive()

getRatesNegative

public double[] getRatesNegative()

getPhiInverseWidth

public double[] getPhiInverseWidth()

getPhiAuxShift

public double[] getPhiAuxShift()

getPhiAuxFactor

public double[] getPhiAuxFactor()

isClique

public static boolean isClique(ModuleDhan module,
                               int[] cluster)
Checks whether the input `cluster' is a clique of module `module' which has to be of `ModuleDhan'-type.


isClique

public boolean isClique(int[] cluster)
Checks whether the input `cluster' is a clique of module `module' which has to be of `ModuleDhan'-type.