nnmt._solvers._firing_rate_integration

nnmt._solvers._firing_rate_integration(firing_rate_func, firing_rate_params, input_funcs, input_params, nu_0=None, fixpoint_method='ODE', eps_tol=1e-07, t_max_ODE=1000, maxiter_ODE=1000)[source]

Solves the self-consistent eqs for firing rates, mean, and std of input.

Parameters:
firing_rate_funcfunc

Function to be integrated.

firing_rates_paramsdict

Parameters passed to firing_rates_func

input_funcslist

List of functions needed to be run to calculate input to firing_rate_func. They need to be in the order they are passed to the firing_rate_func, and they need to be the first arguments of firing_rate_func.

input_paramsdict

Parameters passed to functions calculating mean and std of input.

nu_0[None | np.ndarray]

Initial guess for fixed point integration. If None the initial guess is 0 for all populations. Default is None.

fixpoint_methodstr

Method used for finding the fixed point. Currently, the following method are implemented: ODE, LSQTSQ. ODE is a very good choice, which finds stable fixed points even if the initial guess is far from the fixed point. LSQTSQ also finds unstable fixed points but needs a good initial guess. Default is ODE.

ODE :
Solves the initial value problem

dnu / ds = - nu + firing_rate_func(nu)

with initial value nu_0 on the interval [0, t_max_ODE]. The final value at t_max_ODE is used as a new initial value and the initial value problem is solved again. This procedure is iterated until the criterion for a self-consistent solution

max( abs(nu[t_max_ODE-1] - nu[t_max_ODE]) ) < eps_tol

is fulfilled. Raises an error if this does not happen within maxiter_ODE iterations.

LSTSQ :
Determines the minimum of

(nu - firing_rate_func(nu))^2

using least squares. Raises an error if the solution is a local minimum with mean squared differnce above eps_tol.

eps_tolfloat

Maximal incremental stepsize at which to stop the iteration procedure. Default is 1e-7.

t_max_ODEint

Determines the interval [0, t_max_ODE] on which the initial value problem for the method ODE is solved in a single iteration. Default is 1000.

maxiter_ODEint

Determines the maximum number of iterations of the initial value problem for the method ODE. Default is 1000.