Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members  

StatisticsOutput Class Reference

#include <amygdala/statisticsoutput.h>

Inheritance diagram for StatisticsOutput:

SpikeOutput List of all members.

Public Methods

 StatisticsOutput ()
virtual ~StatisticsOutput ()
virtual void OutputEvent (AmIdInt neuronId, AmTimeInt eventTime)
virtual void OutputCache ()
void SetStepSize (AmTimeInt step)
AmTimeInt GetStepSize () const
void ClearHistory ()
vector< unsigned int > & Histogram ()
vector< unsigned int > & Histogram (AmIdInt neuronId)
vector< unsigned int > Histogram (AmTimeInt start, AmTimeInt end)
vector< unsigned int > Histogram (AmIdInt neuronId, AmTimeInt start, AmTimeInt end)
float PeakSpikeRate ()
float PeakSpikeRate (AmIdInt neuronId)
AmTimeInt PeakRateTime ()
AmTimeInt PeakRateTime (AmIdInt neuronId)
AmIdInt PeakNeuron ()
AmIdInt MostActiveNeuron ()
unsigned int TotalOutputSpikes ()
unsigned int TotalOutputSpikes (AmIdInt neuronId)
float MeanSpikeRate ()
float MeanSpikeRate (AmIdInt neuronId)
void LogSpikeTimes (string filename, AmTimeInt start=0, AmTimeInt end=~0)
void AddTrace (AmIdInt nId)
void CloseLog ()

Protected Methods

void Log (AmIdInt neuronId, AmTimeInt eventTime)

Protected Attributes

hash_map< AmIdInt, vector<
AmTimeInt > > 
outputHistory
hash_map< AmIdInt, vector<
unsigned int > > 
histogram
vector< unsigned int > combinedHistogram
AmIdInt maxPeakId
AmTimeInt maxPeakTime
AmIdInt mostActiveId
unsigned int mostActiveCount
float combinedPeakRate
AmTimeInt combinedPeakTime
float meanRate
unsigned int totalSpikeCount
AmTimeInt stepSize
AmTimeInt beginTime
AmTimeInt calcTime
AmTimeInt lastCalcTime
set< AmIdInt > traceNeurons
bool logging
AmTimeInt logStart
AmTimeInt logEnd
FILE * logFd

Detailed Description

Provides statistics and logging facilities to debug networks.
See also:
SpikeOutput
Author:
Matt Grover , Rüdiger Koch


Member Function Documentation

void StatisticsOutput::AddTrace AmIdInt    nId
 

Select a neuron for logging. This function must be called repeatedly to select multiple neurons. Calling this function the first time results in turning off logging for all other neurons

void StatisticsOutput::ClearHistory  
 

Clear out the raw data. This may be done if the simulation is run for a period of time and then resumed after doing some analysis of the results. ClearHistory() can be called before resuming if the old data is not wanted for the next round of analysis.

void StatisticsOutput::CloseLog  
 

Close a the file descriptor if open

AmTimeInt StatisticsOutput::GetStepSize   const [inline]
 

Get the time step size. (ms)

vector<unsigned int> StatisticsOutput::Histogram AmIdInt    neuronId,
AmTimeInt    start,
AmTimeInt    end
 

Generate a histogram detailing the activity of neuronId between start and end times. Times are measured in ms.

vector<unsigned int> StatisticsOutput::Histogram AmTimeInt    start,
AmTimeInt    end
 

Generate a histogram detailing the combined output activity for all output neurons between start and end times. Times are measured in ms.

vector<unsigned int>& StatisticsOutput::Histogram AmIdInt    neuronId
 

Generate a histogram detailing the activity of neuronId during the life of the simulation.

vector<unsigned int>& StatisticsOutput::Histogram  
 

Generate a histogram detailing the combined output activity for all output neurons during the life of the simulation.

void StatisticsOutput::Log AmIdInt    neuronId,
AmTimeInt    eventTime
[protected]
 

write logging info to the log file

void StatisticsOutput::LogSpikeTimes string    filename,
AmTimeInt    start = 0,
AmTimeInt    end = ~0
 

Turn on logging

Parameters:
filename  The logfile
start  simTime when logging starts
end  simTime when logging ends

float StatisticsOutput::MeanSpikeRate AmIdInt    neuronId
 

Find the mean spike rate for neuron neuronId. (spikes/sec)

float StatisticsOutput::MeanSpikeRate  
 

Find the mean spike rate for all output neurons. (spikes/sec)

AmIdInt StatisticsOutput::MostActiveNeuron  
 

Find the neuron with the highest number of output spikes overall.

virtual void StatisticsOutput::OutputCache   [inline, virtual]
 

If output is turned on in caching mode, this function will be called every time the cache is emptied. Arguments TBD.

Implements SpikeOutput.

virtual void StatisticsOutput::OutputEvent AmIdInt    neuronId,
AmTimeInt    eventTime
[virtual]
 

Raise an output event. If output is turned on in streaming mode, this function will be called every time an output neuron spikes.

Implements SpikeOutput.

AmIdInt StatisticsOutput::PeakNeuron  
 

Find the neuron with the highest peak spike rate.

AmTimeInt StatisticsOutput::PeakRateTime AmIdInt    neuronId
 

Find the time of the peak spike rate for neuronId. (ms)

AmTimeInt StatisticsOutput::PeakRateTime  
 

Find the time of the peak spike rate for the combined output of all output neurons. (ms)

float StatisticsOutput::PeakSpikeRate AmIdInt    neuronId
 

Find the peak spike rate for neuronId. (spikes/sec)

float StatisticsOutput::PeakSpikeRate  
 

Find the peak spike rate for the combined output of all output neurons. (spikes/sec)

void StatisticsOutput::SetStepSize AmTimeInt    step
 

Set the time step size (ms) to be used for calculating spike rates. This also determines the width of the elements for the histograms.

unsigned int StatisticsOutput::TotalOutputSpikes AmIdInt    neuronId
 

Find the total number of spikes for neuron neuronId.

unsigned int StatisticsOutput::TotalOutputSpikes  
 

Find the total number of spikes for all output neurons.


Member Data Documentation

AmTimeInt StatisticsOutput::beginTime [protected]
 

Time that statistics collection began (can be reset)

AmTimeInt StatisticsOutput::calcTime [protected]
 

Time of last reported output spike (us)

hash_map< AmIdInt, vector<unsigned int> > StatisticsOutput::histogram [protected]
 

The histograms can be filled either during the simulation inside OutputEvent() or later on from the contents of outputHistory.

AmTimeInt StatisticsOutput::lastCalcTime [protected]
 

Time that last calculation was done (us)

AmTimeInt StatisticsOutput::stepSize [protected]
 

histogram step size (ms)

set<AmIdInt> StatisticsOutput::traceNeurons [protected]
 

The set of neurons that get traced. If empty all neurons get traced


The documentation for this class was generated from the following file:
Generated on Wed Sep 4 02:30:37 2002 for Amygdala by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002