hnn_core.optimization.Optimizer#
- class hnn_core.optimization.Optimizer(initial_net, tstop, constraints, set_params, initial_params=None, solver='bayesian', obj_fun='dipole_rmse', max_iter=200)[source]#
Methods
fit(**obj_fun_kwargs)Runs optimization routine.
plot_convergence([ax, show])Convergence plot.
- fit(**obj_fun_kwargs)[source]#
Runs optimization routine.
- Parameters:
- targetinstance of Dipole (Required if obj_fun=’dipole_rmse’)
A dipole object with experimental data.
- n_trialsint (Optional if obj_fun=’dipole_rmse’)
Number of trials to simulate and average.
- f_bandslist of tuples (Required if obj_fun=’maximize_psd’)
Lower and higher limit for each frequency band.
- relative_bandpowerlist of float | float (Required if obj_fun=’maximize_psd’)
Weight for each frequency band in f_bands. If a single float is provided, the same weight is applied to all frequency bands.
- scale_factorfloat, optional
The dipole scale factor.
- smooth_window_lenfloat, optional
The smooth window length.