NEST main@caf0ae8
 
Loading...
Searching...
No Matches
threshold_lin_rate.h
Go to the documentation of this file.
1/*
2 * threshold_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 THRESHOLD_LIN_RATE_H
24#define THRESHOLD_LIN_RATE_H
25
26// C++ includes:
27#include <algorithm>
28
29// Includes from models:
30#include "rate_neuron_ipn.h"
32#include "rate_neuron_opn.h"
36
37namespace nest
38{
39
40/* BeginUserDocs: neuron, rate
41
42Short description
43+++++++++++++++++
44
45Rate model with threshold-linear gain function
46
47Description
48+++++++++++
49
50``threshold_lin_rate`` is an implementation of a nonlinear rate model with
51input function :math:`input(h) = min( max( g \cdot ( h - \theta ), 0 ),
52\alpha )`. It either models a rate neuron with input noise (see
53``rate_neuron_ipn``), a rate neuron with output noise (see
54``rate_neuron_opn``) or a rate transformer (see
55``rate_transformer_node``). Input transformation can either be applied to
56individual inputs or to the sum of all inputs.
57
58The model supports connections to other rate models with either zero
59or non-zero delay, and uses the secondary_event concept introduced
60with the gap-junction framework.
61
62The boolean parameter linear_summation determines whether the input
63from different presynaptic neurons is first summed linearly and then
64transformed by a nonlinearity (true), or if the input from individual
65presynaptic neurons is first nonlinearly transformed and then summed
66up (false). Default is true.
67
68Nonlinear rate neuron instances can be obtained by creating models of
69type ``threshold_lin_rate_ipn`` for input noise or of type
70``threshold_lin_rate_opn`` output noise. Nonlinear rate transformers
71can be obtained by creating models of type
72``rate_transformer_threshold_lin``.
73
74See also :footcite:p:`Hahne2017` :footcite:p:`Hahne2015`.
75
76Parameters
77++++++++++
78
79The following parameters can be set in the status dictionary. Note
80that some of the parameters only apply to rate neurons and not to rate
81transformers.
82
83================== ======= ==============================================
84 rate real Rate (unitless)
85 tau ms Time constant of rate dynamics
86 mu real Mean input
87 sigma real Noise parameter
88 g real Gain parameter
89 alpha real Second Threshold
90 theta real Threshold
91 rectify_rate real Rectifying rate
92 linear_summation boolean Specifies type of non-linearity (see above)
93 rectify_output boolean Switch to restrict rate to values >= rectify_rate
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
116
117Examples using this model
118+++++++++++++++++++++++++
119
120.. listexamples:: threshold_lin_rate
121
122EndUserDocs */
123
125{
126private:
128 double g_;
129
131 double theta_;
132
134 double alpha_;
135
136public:
139 : g_( 1.0 )
140 , theta_( 0.0 )
141 , alpha_( std::numeric_limits< double >::infinity() )
142 {
143 }
144
145 void get( Dictionary& ) const;
146 void set( const Dictionary&, Node* node );
147
148 double input( double h ); // non-linearity on input
149 double mult_coupling_ex( double rate ); // factor of multiplicative coupling
150 double mult_coupling_in( double rate ); // factor of multiplicative coupling
151};
152
153inline double
155{
156 return std::min( std::max( g_ * ( h - theta_ ), 0. ), alpha_ );
157}
158
159inline double
164
165inline double
170
172void register_threshold_lin_rate_ipn( const std::string& name );
173
175void register_threshold_lin_rate_opn( const std::string& name );
176
178void register_rate_transformer_threshold_lin( const std::string& name );
179
180
181template <>
183template <>
185template <>
187
188} // namespace nest
189
190
191#endif /* #ifndef THRESHOLD_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 threshold_lin_rate.h:125
double theta_
threshold of gain function
Definition threshold_lin_rate.h:131
double mult_coupling_in(double rate)
Definition threshold_lin_rate.h:166
double alpha_
second threshold of gain function
Definition threshold_lin_rate.h:134
double g_
gain factor of gain function
Definition threshold_lin_rate.h:128
void set(const Dictionary &, Node *node)
Set values from dictionary.
Definition threshold_lin_rate.cpp:61
void get(Dictionary &) const
Store current values in dictionary.
Definition threshold_lin_rate.cpp:53
nonlinearities_threshold_lin_rate()
sets default parameters
Definition threshold_lin_rate.h:138
double input(double h)
Definition threshold_lin_rate.h:154
double mult_coupling_ex(double rate)
Definition threshold_lin_rate.h:160
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_rate_transformer_threshold_lin(const std::string &name)
Definition threshold_lin_rate.cpp:46
rate_transformer_node< nonlinearities_threshold_lin_rate > rate_transformer_threshold_lin
Definition threshold_lin_rate.h:177
rate_neuron_ipn< nonlinearities_threshold_lin_rate > threshold_lin_rate_ipn
Definition threshold_lin_rate.h:171
rate_neuron_opn< nonlinearities_threshold_lin_rate > threshold_lin_rate_opn
Definition threshold_lin_rate.h:174
void register_threshold_lin_rate_ipn(const std::string &name)
Definition threshold_lin_rate.cpp:34
void register_threshold_lin_rate_opn(const std::string &name)
Definition threshold_lin_rate.cpp:40