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