NEST main@caf0ae8
 
Loading...
Searching...
No Matches
gauss_rate.h
Go to the documentation of this file.
1/*
2 * gauss_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 GAUSS_RATE_H
24#define GAUSS_RATE_H
25
26// C++ includes:
27#include <cmath>
28
29// Includes from models:
30#include "rate_neuron_ipn.h"
34
35// Includes from libnestutil:
36#include "dict_util.h"
37
38
39namespace nest
40{
41
42/* BeginUserDocs: neuron, rate
43
44Short description
45+++++++++++++++++
46
47Rate neuron model with Gaussian gain function
48
49Description
50+++++++++++
51
52``gauss_rate`` is an implementation of a nonlinear rate model with input
53
54.. math::
55
56 input(h) = g \cdot \exp( -( x - \mu )^2 / ( 2 \cdot \sigma^2 ) )
57
58It either models a rate neuron with input noise (see ``rate_neuron_ipn``)
59or a rate transformer (see ``rate_transformer_node``).
60Input transformation can either be applied to individual inputs
61or to the sum of all inputs.
62
63The model supports connections to other rate models with either zero or
64non-zero delay, and uses the ``secondary_event`` concept introduced with
65the gap-junction framework.
66
67Nonlinear rate neurons can be created by typing
68``nest.Create("gauss_rate_ipn")``. Nonlinear rate transformers can be
69created by typing ``nest.Create("rate_transformer_gauss")``.
70
71See also :footcite:p:`Hahne2017`, :footcite:p:`Hahne2015`.
72
73Parameters
74++++++++++
75
76The following parameters can be set in the status dictionary. Note
77that some of the parameters only apply to rate neurons and not to rate
78transformers.
79
80================= ======= ==============================================
81 rate real Rate (unitless)
82 tau ms Time constant of rate dynamics
83 mu real Mean input
84 sigma real Noise parameter
85 g real Gain parameter
86 mu real Mean of the Gaussian gain function
87 sigma real Standard deviation of Gaussian gain function
88 rectify_rate real Rectifying rate
89 linear_summation boolean Specifies type of non-linearity (see above)
90 rectify_output boolean Switch to restrict rate to values >= rectify_rate
91================= ======= ==============================================
92
93Note:
94
95The boolean parameter ``linear_summation`` determines whether the
96input from different presynaptic neurons is first summed linearly and
97then transformed by a nonlinearity (true), or if the input from
98individual presynaptic neurons is first nonlinearly transformed and
99then summed up (false). Default is true.
100
101References
102++++++++++
103
104.. footbibliography::
105
106Sends
107+++++
108
109InstantaneousRateConnectionEvent, DelayedRateConnectionEvent
110
111Receives
112++++++++
113
114InstantaneousRateConnectionEvent, DelayedRateConnectionEvent,
115DataLoggingRequest
116
117See also
118++++++++
119
120rate_connection_instantaneous, rate_connection_delayed
121
122Examples using this model
123+++++++++++++++++++++++++
124
125.. listexamples:: gauss_rate
126
127EndUserDocs */
128
130{
131private:
133 double g_;
134 double mu_;
135 double sigma_;
136
137public:
140 : g_( 1.0 )
141 , mu_( 0.0 )
142 , sigma_( 0.0 )
143 {
144 }
145
146 void get( Dictionary& ) const;
147 void set( const Dictionary&, Node* );
148
149 double input( double h ); // non-linearity on input
150 double mult_coupling_ex( double rate ); // factor of multiplicative coupling
151 double mult_coupling_in( double rate ); // factor of multiplicative coupling
152};
153
154inline double
156{
157 return g_ * ( std::exp( -pow( h - mu_, 2. ) / ( 2. * pow( sigma_, 2. ) ) ) );
158}
159
160inline double
162{
163 return 1.;
164}
165
166inline double
168{
169 return 1.;
170}
171
173void register_gauss_rate_ipn( const std::string& name );
174
176void register_rate_transformer_gauss( const std::string& name );
177
178
179template <>
181template <>
183
184} // namespace nest
185
186
187#endif /* #ifndef GAUSS_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 gauss_rate.h:130
double mult_coupling_in(double rate)
Definition gauss_rate.h:167
double mult_coupling_ex(double rate)
Definition gauss_rate.h:161
double input(double h)
Definition gauss_rate.h:155
void get(Dictionary &) const
Store current values in dictionary.
Definition gauss_rate.cpp:47
void set(const Dictionary &, Node *)
Set values from dictionary.
Definition gauss_rate.cpp:55
double mu_
Definition gauss_rate.h:134
nonlinearities_gauss_rate()
sets default parameters
Definition gauss_rate.h:139
double sigma_
Definition gauss_rate.h:135
double g_
gain factor of gain function
Definition gauss_rate.h:133
Definition rate_neuron_ipn.h:109
Definition rate_transformer_node.h:104
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
rate_transformer_node< nonlinearities_gauss_rate > rate_transformer_gauss
Definition gauss_rate.h:175
void register_gauss_rate_ipn(const std::string &name)
Definition gauss_rate.cpp:34
rate_neuron_ipn< nonlinearities_gauss_rate > gauss_rate_ipn
Definition gauss_rate.h:172
void register_rate_transformer_gauss(const std::string &name)
Definition gauss_rate.cpp:40