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