Leaky
[Neuron]


Data Structures

struct  aspi_leaky_t
 Leaky instance structure. More...
struct  aspi_leaky_class_t
 Leaky class structure. More...

Defines

#define ASPI_LEAKY(x)   (aspi_object_check (x, aspi_leaky ()), ((aspi_leaky_t *) x))
#define ASPI_LEAKY_CLASS(x)   (aspi_class_check (x, aspi_leaky ()), ((aspi_leaky_class_t * ) x))

Functions

aspi_class_taspi_leaky (void)
void aspi_leaky_dtor (aspi_object_t *self)
aspi_object_taspi_leaky_dup (aspi_object_t *self)
aspi_object_taspi_leaky_init (aspi_object_t *self)
aspi_object_taspi_leaky_init_full (aspi_object_t *self, int memory, int delay)
void aspi_leaky_set_memory (aspi_object_t *self, int memory)
 Set memory of the neuron.
void aspi_leaky_set_max_delay (aspi_object_t *self, int delay)
 Set max delay of a neuron.
void aspi_leaky_add_in_n_steps (aspi_object_t *self, double voltage, int steps)
void aspi_leaky_update_voltage (aspi_object_t *self)
double aspi_leaky_get_threshold (aspi_object_t *self)
double aspi_leaky_get_threshold_ip (aspi_object_t *self)
void aspi_leaky_set_threshold (aspi_object_t *self, double threshold)
int aspi_leaky_get_last_spike_before (aspi_object_t *self, int before)
double aspi_leaky_get_v_trace (aspi_object_t *self)
double aspi_leaky_get_v_trace_at (aspi_object_t *self, int time)
int aspi_leaky_get_last_spike (aspi_object_t *self)
void aspi_leaky_set_last_spike (aspi_object_t *self, int time)
void aspi_leaky_fire (aspi_object_t *self)
 Make a neuron fire.
void aspi_leaky_class_set_threshold (double threshold)
void aspi_leaky_class_set_threshold_leak (double leak)
double aspi_leaky_class_get_threshold (void)
void aspi_leaky_class_set_rest_voltage (double rest)
void aspi_leaky_class_set_noise (double noise)
void aspi_leaky_class_set_leak (double leak)
void aspi_leaky_class_set_refractory (int refractory)
int aspi_leaky_class_get_refractory (void)
void aspi_leaky_class_set_stp (int set_stp)
void aspi_leaky_class_set_ip (int set_ip)
void aspi_leaky_class_set_ip_factor (double ip_factor)
void aspi_leaky_class_set_dynamic_threshold (int dynamic_threshold)
int aspi_leaky_has_fired (aspi_object_t *self)
int aspi_leaky_has_fired_at (aspi_object_t *self, int time)
double aspi_leaky_get_voltage (aspi_object_t *self)
double aspi_leaky_get_freq (aspi_object_t *self)
void aspi_neuron_class_set_reversal_potential (int set_reversal_potential)
void aspi_neuron_class_set_reversal_potentials (double rev_pot_exci, double rev_pot_inhib)

Detailed Description

Leaky integrate-and-fire neuron

This class implement a leaky integrate-and-fire neuron which can manage its delays


Define Documentation

#define ASPI_LEAKY (  )     (aspi_object_check (x, aspi_leaky ()), ((aspi_leaky_t *) x))

#define ASPI_LEAKY_CLASS (  )     (aspi_class_check (x, aspi_leaky ()), ((aspi_leaky_class_t * ) x))


Function Documentation

aspi_class_t * aspi_leaky ( void   ) 

void aspi_leaky_add_in_n_steps ( aspi_object_t self,
double  voltage,
int  steps 
)

int aspi_leaky_class_get_refractory ( void   ) 

Get refractory period

double aspi_leaky_class_get_threshold ( void   ) 

Get class threshold

void aspi_leaky_class_set_dynamic_threshold ( int  dynamic_threshold  ) 

Set / unset dynamic threshold

Parameters:
set_dynamic_threshold,: 1 to activate dynamic threshold

void aspi_leaky_class_set_ip ( int  set_ip  ) 

Set / unset short term plasticity

Parameters:
set_ip,: 1 to activate Intrinsic Plasticity, 0 to turn it off
The idea of our IP is that the threshold of a neuron i is multiplicated by the standard deviation of the weights of incoming synapses, divided by the initial standard deviation.

Thus, it ensures that the effective weights' standard deviation is keeped the same : it has an homeostatic effect.

void aspi_leaky_class_set_ip_factor ( double  ip_factor  ) 

Set IP factor

If IP is used, it is used as a power multiplying standard deviation

void aspi_leaky_class_set_leak ( double  leak  ) 

Set leak (default = 0.9)

void aspi_leaky_class_set_noise ( double  noise  ) 

Set noise (default = 0.0)

void aspi_leaky_class_set_refractory ( int  refractory  ) 

Set refractory period (default = 0)

void aspi_leaky_class_set_rest_voltage ( double  rest  ) 

Set rest voltage (default = 0.0)

void aspi_leaky_class_set_stp ( int  set_stp  ) 

Set / unset short term plasticity

Parameters:
set_stp,: 1 to activate STP, 0 to deactivate it.
STP is done the following way: each synapse weight is multplicated by (1 - f), where f is the trace of the presynaptic neuron's activity.

This way, a synapse's efficacy decreases when it is used and increase when it isn't.

void aspi_leaky_class_set_threshold ( double  threshold  ) 

Set threshold (default = 1.0)

void aspi_leaky_class_set_threshold_leak ( double  leak  ) 

Set a neuron's threshold leak

Only used if the dynamic threshold is used.

void aspi_leaky_dtor ( aspi_object_t self  ) 

aspi_object_t * aspi_leaky_dup ( aspi_object_t self  ) 

void aspi_leaky_fire ( aspi_object_t self  ) 

Make a neuron fire.

This is done by setting its last fire time to next time and ressetting membrane voltage.

References ASPI_LEAKY, aspi_leaky_set_last_spike(), ASPI_NETWORK, aspi_neuron_set_v(), aspi_leaky_t::network, aspi_leaky_t::threshold, and aspi_network_t::time.

double aspi_leaky_get_freq ( aspi_object_t self  ) 

Return leaky's frequence

Actually, it corresponds to a trace of the neuron's activity

References ASPI_LEAKY, and aspi_leaky_t::freq.

Referenced by aspi_network_get_freq_kurtosis(), and aspi_network_get_freq_skewness().

int aspi_leaky_get_last_spike ( aspi_object_t self  ) 

Same as aspi_leaky_get_last_spike_before, with before = 0

References aspi_leaky_get_last_spike_before().

Referenced by aspi_leaky_has_fired(), and aspi_leaky_update_voltage().

int aspi_leaky_get_last_spike_before ( aspi_object_t self,
int  before 
)

Get last spike (if before = 0), or last spike before BEFORE (before should be set to (t - delay) )

Also note that if before is set and there is no last spike before this date, then -1 is returned.

References ASPI_LEAKY, aspi_leaky_t::index, aspi_leaky_t::last_spike, and aspi_leaky_t::memory.

Referenced by aspi_leaky_get_last_spike(), and aspi_leaky_has_fired_at().

double aspi_leaky_get_threshold ( aspi_object_t self  ) 

Get a neuron's threshold

Return the threshold of a given neuron.

References ASPI_LEAKY, and aspi_leaky_t::threshold.

double aspi_leaky_get_threshold_ip ( aspi_object_t self  ) 

Update a neuron's threshold for intrinsic plasticity

(According to standard deviation of weights incoming to the neuron)

References ASPI_LEAKY, ASPI_NETWORK, aspi_leaky_t::network, aspi_leaky_t::std_dev_ip_current, aspi_leaky_t::std_dev_ip_init, aspi_leaky_t::threshold, and aspi_network_t::time.

Referenced by aspi_leaky_update_voltage().

double aspi_leaky_get_v_trace ( aspi_object_t self  ) 

This method returns the current v_trace of the neuron.

References ASPI_LEAKY, aspi_leaky_get_v_trace_at(), and ASPI_NETWORK.

double aspi_leaky_get_v_trace_at ( aspi_object_t self,
int  time 
)

This method returns the v_trace at time t.

It only works if t is in the memory of the neuron ; else 0.0 is returned.

Parameters:
time,: network's time

References ASPI_LEAKY, ASPI_NETWORK, aspi_return_value_if_fail, aspi_leaky_t::memory, aspi_leaky_t::network, aspi_network_t::time, and aspi_leaky_t::v_traces.

Referenced by aspi_leaky_get_v_trace().

double aspi_leaky_get_voltage ( aspi_object_t self  ) 

Returns the voltage of the neuron.

Returns:
v if neuron hasn't fired, _v_spike else

References ASPI_LEAKY, aspi_leaky_has_fired(), aspi_neuron_get_v(), and aspi_leaky_t::max_delay.

int aspi_leaky_has_fired ( aspi_object_t self  ) 

Tells whether the neuron has fired last step

References ASPI_LEAKY, aspi_leaky_get_last_spike(), ASPI_NETWORK, aspi_leaky_t::network, and aspi_network_t::time.

Referenced by aspi_leaky_get_voltage().

int aspi_leaky_has_fired_at ( aspi_object_t self,
int  time 
)

Tells whether the neuron fired at step t. As you might guess, it is not always possible to tell. So the result is :

  • 1 if neuron fired
  • 0 if it didn't, or we don't know
  • and actually a vile error. So you should not use this method... before checking memory of the neuron. It is done to be used by STDP, that's all.

References aspi_leaky_get_last_spike_before().

aspi_object_t * aspi_leaky_init ( aspi_object_t self  ) 

aspi_object_t * aspi_leaky_init_full ( aspi_object_t self,
int  memory,
int  delay 
)

Leaky constructor - full

If memory is set, last_spike buffer is alloc'ed, else it is set to zero. Same thing for max_delay and futur_voltages buffer

References aspi_leaky_init(), aspi_leaky_set_max_delay(), and aspi_leaky_set_memory().

void aspi_leaky_set_last_spike ( aspi_object_t self,
int  time 
)

Set the last spike for a neuron.

Note that it is assumed that when you call this method 2 times, t2 > t1

References ASPI_LEAKY, aspi_leaky_t::index, aspi_leaky_t::last_spike, and aspi_leaky_t::memory.

Referenced by aspi_leaky_fire(), and aspi_leaky_update_voltage().

void aspi_leaky_set_max_delay ( aspi_object_t self,
int  delay 
)

Set max delay of a neuron.

Alloc the necessary memory

Shouldn't be used while net is running

References ASPI_LEAKY, aspi_return_if_fail, aspi_leaky_t::futur_voltages_exci, aspi_leaky_t::futur_voltages_inhib, and aspi_leaky_t::max_delay.

Referenced by aspi_leaky_dup(), and aspi_leaky_init_full().

void aspi_leaky_set_memory ( aspi_object_t self,
int  memory 
)

Set memory of the neuron.

Alloc the necessary memory for the buffer

You shouldn't use this method while net is runinng

References ASPI_LEAKY, aspi_return_if_fail, aspi_leaky_t::last_spike, aspi_leaky_t::memory, and aspi_leaky_t::v_traces.

Referenced by aspi_leaky_dup(), aspi_leaky_init(), and aspi_leaky_init_full().

void aspi_leaky_set_threshold ( aspi_object_t self,
double  threshold 
)

Set a neuron's threshold

If this function is not called individually (except in the init func), then threshold is the default one.

References ASPI_LEAKY, and aspi_leaky_t::threshold.

void aspi_leaky_update_voltage ( aspi_object_t self  ) 

Update the voltages of a neuron, ie, add the voltages it got in precedent steps

Of course, this method is used by the model's method, but the network must still uptade all neuron's voltage.

This method also "reset" the spike if neuron has fired

It also handles the v_trace.

References ASPI_LEAKY, aspi_leaky_get_last_spike(), aspi_leaky_get_threshold_ip(), aspi_leaky_set_last_spike(), aspi_misc_random_gaussian(), ASPI_NETWORK, ASPI_NEURON, aspi_neuron_add_to_v(), aspi_neuron_get_v(), aspi_neuron_set_v(), aspi_leaky_t::freq, aspi_leaky_t::futur_voltages_exci, aspi_leaky_t::futur_voltages_inhib, aspi_leaky_t::max_delay, aspi_leaky_t::memory, aspi_leaky_t::network, aspi_leaky_t::threshold, aspi_leaky_t::v_mem, aspi_leaky_t::v_traces, and aspi_leaky_t::vindex.

void aspi_neuron_class_set_reversal_potential ( int  set_reversal_potential  ) 

Set reversal potential

If it is set, a neuron will receive I = I (v - v_r) instead of I.

V_r being different for excitation (rev_pot_exci) and inhibition (rev_pot_inhib).

Those must be set with aspi_leaky_class_set_reversal_potentials (mind the s)

void aspi_neuron_class_set_reversal_potentials ( double  rev_pot_exci,
double  rev_pot_inhib 
)

Set reversal potentials

If set_reversal_potential is set, a neuron will receive I = I (v - v_r) instead of I.

V_r being different for excitation (rev_pot_exci) and inhibition (rev_pot_inhib).


Generated on Wed Aug 19 01:16:48 2009 for aspirenn by  doxygen 1.5.5