NEST main@caf0ae8
 
Loading...
Searching...
No Matches
lin_rate.h
Go to the documentation of this file.
1/*
2 * lin_rate.h
3 *
4 * This file is part of NEST.
5 *
6 * Copyright (C) 2004 The NEST Initiative
7 *
8 * NEST is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * NEST is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with NEST. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22
23#ifndef LIN_RATE_H
24#define LIN_RATE_H
25
26// Includes from models:
27#include "rate_neuron_ipn.h"
29#include "rate_neuron_opn.h"
33
34namespace nest
35{
36
37/* BeginUserDocs: neuron, rate
38
39Short description
40+++++++++++++++++
41
42Linear rate model
43
44Description
45+++++++++++
46
47``lin_rate`` is an implementation of a rate model with linear input
48function :math:`input(h) = g \cdot h`. It either models a rate neuron with
49input noise (see ``rate_neuron_ipn``), a rate neuron with output noise
50(see ``rate_neuron_opn``) or a rate transformer (see
51``rate_transformer_node``).
52
53Linear rate neurons support multiplicative coupling which can be
54switched on and off via the boolean parameter ``mult_coupling``
55(default=false). In case multiplicative coupling is active, the
56excitatory input of the model is multiplied with the function
57:math:`mult\_coupling\_ex(rate) = g_{ex} \cdot ( \theta_{ex} - rate )` and the
58inhibitory input is multiplied with the function
59:math:`mult\_coupling\_in(rate) = g_{in} \cdot ( \theta_{in} + rate )`.
60
61The model supports connections to other rate models with either zero
62or non-zero delay, and it uses the secondary_event concept introduced
63with the gap-junction framework.
64
65Linear rate neurons can be created by typing
66``nest.Create("lin_rate_ipn")`` or ``nest.Create("lin_rate_opn")`` for input
67noise or output noise, respectively. Linear rate transformers can be
68created by typing ``nest.Create("rate_transformer_lin")``.
69
70See also :footcite:p:`Hahne2017`, :footcite:p:`Hahne2015`.
71
72Parameters
73++++++++++
74
75The following parameters can be set in the status dictionary. Note
76that some of the parameters only apply to rate neurons and not to rate
77transformers.
78
79=============== ======= ==================================================
80 rate real Rate (unitless)
81 tau ms Time constant of rate dynamics
82 lambda real Passive decay rate
83 mu real Mean input
84 sigma real Noise parameter
85 g real Gain parameter
86 mult_coupling boolean Switch to enable/disable multiplicative coupling
87 g_ex real Linear factor in multiplicative coupling
88 g_in real Linear factor in multiplicative coupling
89 theta_ex real Shift in multiplicative coupling
90 theta_in real Shift in multiplicative coupling
91 rectify_rate real Rectifying rate
92 rectify_output boolean Switch to restrict rate to values >= rectify_rate
93=============== ======= ==================================================
94
95
96References
97++++++++++
98
99.. footbibliography::
100
101Sends
102+++++
103
104InstantaneousRateConnectionEvent, DelayedRateConnectionEvent
105
106Receives
107++++++++
108
109InstantaneousRateConnectionEvent, DelayedRateConnectionEvent,
110DataLoggingRequest
111
112See also
113++++++++
114
115rate_connection_instantaneous, rate_connection_delayed,
116rate_neuron_ipn, rate_neuron_opn
117
118Examples using this model
119+++++++++++++++++++++++++
120
121.. listexamples:: lin_rate
122
123EndUserDocs */
124
126{
127private:
129 double g_;
131 double g_ex_;
133 double g_in_;
135 double theta_ex_;
136 double theta_in_;
137
138public:
141 : g_( 1.0 )
142 , g_ex_( 1.0 )
143 , g_in_( 1.0 )
144 , theta_ex_( 0.0 )
145 , theta_in_( 0.0 )
146 {
147 }
148
149 void get( Dictionary& ) const;
150 void set( const Dictionary&, Node* node );
151
152 double input( double h ); // non-linearity on input
153 double mult_coupling_ex( double rate ); // factor of multiplicative coupling
154 double mult_coupling_in( double rate ); // factor of multiplicative coupling
155};
156
157inline double
159{
160 return g_ * h;
161}
162
163inline double
165{
166 return g_ex_ * ( theta_ex_ - rate );
167}
168
169inline double
171{
172 return g_in_ * ( theta_in_ + rate );
173}
174
176void register_lin_rate_ipn( const std::string& name );
177
179void register_lin_rate_opn( const std::string& name );
180
182void register_rate_transformer_lin( const std::string& name );
183
184
185template <>
187template <>
189template <>
191
192
193} // namespace nest
194
195
196#endif /* #ifndef LIN_RATE_H */
Dictionary class for interface to Python and C++ API.
Definition dictionary.h:213
Base class for all NEST network objects.
Definition node.h:99
void create()
Create the map.
Definition recordables_map.h:127
Definition lin_rate.h:126
nonlinearities_lin_rate()
sets default parameters
Definition lin_rate.h:140
double input(double h)
Definition lin_rate.h:158
double g_ex_
linear factor in multiplicative excitatory coupling
Definition lin_rate.h:131
double mult_coupling_in(double rate)
Definition lin_rate.h:170
double mult_coupling_ex(double rate)
Definition lin_rate.h:164
double g_in_
linear factor in multiplicative inhibitory coupling
Definition lin_rate.h:133
double theta_in_
Definition lin_rate.h:136
void set(const Dictionary &, Node *node)
Set values from dictionary.
Definition lin_rate.cpp:63
double g_
gain factor of gain function
Definition lin_rate.h:129
void get(Dictionary &) const
Store current values in dictionary.
Definition lin_rate.cpp:53
double theta_ex_
offset in multiplicative coupling
Definition lin_rate.h:135
Definition rate_neuron_ipn.h:109
Definition rate_neuron_opn.h:113
Definition rate_transformer_node.h:104
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
void register_lin_rate_ipn(const std::string &name)
Definition lin_rate.cpp:34
rate_neuron_opn< nonlinearities_lin_rate > lin_rate_opn
Definition lin_rate.h:178
void register_rate_transformer_lin(const std::string &name)
Definition lin_rate.cpp:46
void register_lin_rate_opn(const std::string &name)
Definition lin_rate.cpp:40
rate_transformer_node< nonlinearities_lin_rate > rate_transformer_lin
Definition lin_rate.h:181
rate_neuron_ipn< nonlinearities_lin_rate > lin_rate_ipn
Definition lin_rate.h:175