NeuroLab
ConditionalEstimator Class Reference

estimates conditional mean, var, etc. of a stochastic process More...

Inheritance diagram for ConditionalEstimator:

Public Member Functions

 ConditionalEstimator (const Property &property, StochasticProcess *stochvar, StochasticEventGenerator *condition, Time *time, int pre, int post, int updateCorrection=0)
 Construct. More...
 
 ConditionalEstimator (const Property &property, StochasticProcess *stochvar, StochasticProcess *condition, Time *time, int pre, int post, int updateCorrection=0)
 Construct. More...
 
void setRejection (int pre, int post)
 Add rejection interval. More...
 
void removeRejection ()
 Remove rejection. More...
 
virtual void setParameter (const Property &p, double value)
 set parameter value
 
virtual void collect ()
 receive next data point
 
virtual Matrix getEstimate (const Property &)
 get some property
 
void init ()
 initialize
 
virtual ~ConditionalEstimator ()
 destruct
 
- Public Member Functions inherited from Estimator
 Estimator (StochasticProcess *src, Time *time, const string &name="", const string &type="Estimator")
 Construct. More...
 
virtual ~Estimator ()
 Destroy. More...
 
- Public Member Functions inherited from Parametric
string getType () const
 Type of object.
 
string getName () const
 Name of object.
 
void setName (const string &name)
 Name of object.
 
string getConfiguration () const
 Returns the configuration of the object. More...
 
string getAllParameters () const
 String with all parameter settings.
 
void addParameter (const string &name)
 Add a parameter. More...
 
void rmParameter (const string &name)
 Remove a parameter. More...
 
virtual void setParameter (const string &name, const string &value)
 Set parameter. More...
 
virtual string getParameter (const string &name) const
 Get parameter. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Parametric
 Parametric (const string &name, const string &type)
 Create object of type and name.
 
virtual ~Parametric ()
 Destroy object.
 
- Protected Attributes inherited from Estimator
Property nEstimate
 what to record
 
StochasticProcesspSource
 the source of data
 
uint nSamples
 number of samples recorded
 
TimeestimatorTime
 Time process for registering and running.
 

Detailed Description

estimates conditional mean, var, etc. of a stochastic process

The conditional estimator records conditional probabilities. It links to a stochastic variable, and an event (both of which are given in the constructor). The variable and the state of the event are recorded each time prepareNextState() is called. If the event is true at a timestep, then the object will go on recording for a number of time steps, and then take all the properties. This enables you to take for instance the mean of a process at 20 time steps before to 10 time step after the occurance of a special event. In that case the 20 time steps would be given as 'pre', the 10 time steps as 'post' to the constructor. The main purpose of this class (at the time it was written) was the recording of spike-triggered averages in neurons.

Constructor & Destructor Documentation

ConditionalEstimator::ConditionalEstimator ( const Property &  property,
StochasticProcess stochvar,
StochasticEventGenerator condition,
Time time,
int  pre,
int  post,
int  updateCorrection = 0 
)

Construct.

This version constructs an object which records (and adds) samples of a stochastic process, depending on whether an event has occured: result = { stochvar(t), t in [pre,post] | condition(0) }.

Parameters
propertya collection of things to record
stochvarthe address of the stochastic variable to record
conditionthe address of the event on which the recording is conditioned
timethe global time object
prenumber of time steps before the event
postnumber of time steps after the event
updateCorrectionoptional; defaults to 0. number of time steps to shift the result; this is to correct different update cascades
ConditionalEstimator::ConditionalEstimator ( const Property &  property,
StochasticProcess stochvar,
StochasticProcess condition,
Time time,
int  pre,
int  post,
int  updateCorrection = 0 
)

Construct.

This version constructs an object which records (and adds) samples of a stochastic process, multiplied with the value of another process: result = { stochvar(t)*condition(0), t in [pre,post] }.

Parameters
propertya collection of things to record
stochvarthe address of the stochastic variable to record
conditionthe address of the process on which the recording is conditioned
timethe global time object
prenumber of time steps before the event
postnumber of time steps after the event
updateCorrectionoptional; defaults to 0. number of time steps to shift the result; this is to correct different update cascades

Member Function Documentation

void ConditionalEstimator::removeRejection ( )

Remove rejection.

Sets the estimator to normal mode again. See setRejection().

void ConditionalEstimator::setRejection ( int  pre,
int  post 
)

Add rejection interval.

Special. You will hardly ever need this. If a rejection interval is set, traces of the process where additional events fall into the interval -pre - post are rejected. (this changes the meausured process

\[X_t\]

to

\[ Y_\tau = \{ X_{t+\tau} | c(t+\tau) \hat \not c(t+s), s \in [-pre,post]/0\}\]

Parameters
prestart of rejection interval, counted from the event (t=0)
postend of rejection interval, counted from the event (t=0)