NeuroLab
|
estimates conditional mean, var, etc. of a stochastic process More...
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 | |
StochasticProcess * | pSource |
the source of data | |
uint | nSamples |
number of samples recorded | |
Time * | estimatorTime |
Time process for registering and running. | |
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.
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) }.
property | a collection of things to record |
stochvar | the address of the stochastic variable to record |
condition | the address of the event on which the recording is conditioned |
time | the global time object |
pre | number of time steps before the event |
post | number of time steps after the event |
updateCorrection | optional; 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] }.
property | a collection of things to record |
stochvar | the address of the stochastic variable to record |
condition | the address of the process on which the recording is conditioned |
time | the global time object |
pre | number of time steps before the event |
post | number of time steps after the event |
updateCorrection | optional; defaults to 0. number of time steps to shift the result; this is to correct different update cascades |
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
to
pre | start of rejection interval, counted from the event (t=0) |
post | end of rejection interval, counted from the event (t=0) |