Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* implemented first method for noisy systems * example folder * added comments and description * start readme * Update README.md * added contributing file * Update README.md * Update README.md * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Update README.md * Update README.md * update with code formatter * - edited docstring of __init__ * added warning and info print for unreasonable parameter choices * revised code * - docstrings according to Sphinx docstring format - updated test cases according to changed default parameters - applied automated code formatting to all changed files and test-files * Update CONTRIBUTING.md * - code formatting with --line-length=120 * - code formatting with --line-length=120 * adjusted shapes of arrays, no network yet * implemented control matrix and precision matrix * starting testing * first functioning version without delay * functional tested version of network OC for fhn * cleaned up * stochastic method * - fix dimensions and slices according to network-compatible dimensionalities (i.e. NxVxT) * - noisy network example * check cmat diagonal entries * - added some description for noisy network example and made the setting fully equivalent to deterministic model example (prec_mat & control_mat) * adjusted test setting, updated example files for noise case * adjusted test setting, updated example files for noise case * added tests in test_fhn_noisy and test_fhn * speed up solve_adjoint method * - removed unused matplotlib import in test_fhn.py - Cmat entries set to interval [0,1] in test_fhn.py and deterministic example * adjust parameters in test_fhn * - baseclass for OC - inherit from OC-baseclass for OC of fhn, passes all tests for fhn-OC - updated docstrings - use "isinstance(x, type(None))" for None-checks * - skeleton for OC for Hopf model - Jacobian for Hopf model - code formatting * - optimal control for Hopf model with quick visual evaluation of the performance in the example files * - fix overwriting attributes of the neurolib-model that is passed to OC -> 'self.model' is deepcopy of the passed 'model' - restructured: jit-functions into the file of derived OC class definition - updated comments & documentation - identified "compute_gradient" as model dependent in its current implementation - Dxdot is currently unused for Hopf & FHN - single test case for Hopf, rely on tests for FHN for shared methods for the moment - updated dt in example to avoid numerical inaccuracies * - add check for passed model in model specific OC - place plotting functions of examples in oc-utility-folder - provide a single example (using the FHN), since completely analogous for Hopf * - add test_twonode_oc for deterministic hopf * - remove fhn example, is replaced by combined example * refactoring stochastic OC * refactored stochastic control * fixed bugs * implemented wc model * oc wc implemented and partially tested * - improved performance of cost functions and derivatives (derivative_precision_cost x7, precision_cost x2 with better readability), all tests passed * functional version wc optimal control * remove file * - remove explicit passing of parameter "N" to precision_cost function - update of docstrings * - simplified function, passes tests * - fix: adjoint_state[t=0] was never computed * - added function 'update_control_with_limit' to limit the absolute value of the control strength at all points in time. Passes tests. - added new attribute 'maximum_control_strength' to the 'OC' class to set the absolute maximum value for the control strength - test cases for the new function 'update_control_with_limit' * - fix: added missing 'maximum_control_strength' as parameter in the derived oc-classes * - fix: added scaling by time step of precision- and energy cost, added parameter in function calls - adjusted corresponding test cases * corrected background missing * - interval in which precision cost is now positional argument to avoid repeated checks of specification and allow notation with "negative indices" in Oc-object initialization - added 'convert_interval' to allow for the different ways of interval specification - updated function calls accordingly - changed test structure: separate tests for the interval-specification * - added: apply maximal-absolute-control-strength constraint even before first optimization - added: new test cases; passes all tests - minor fixes * - additional assertions for interval specification - checks for repeated calls of ".optimize()" - new test cases - removed unused variable and old comments * merged cost_functions_numba branch * merged cost_functions_numba branch * - adjusted to naming 'Duh' for Jacobian - jit the compute_gradient-functions - added documentation & docstrings * removed unnecessary line of code * remove background from oc.py * - adaptive step size computation: * adaptive step-size reduction or -increment, reduces relevance of hyperparameter for initial step size * memorize last step, heavily increases efficiency in many cases - added very generic test case for step-size computation based on derived OcWc-class - "convert_interval" not further numba-compiled - improved documentation, added type-description in model specific OC classes - added todo-hints for automated control-adjustments - set default of "precision_cost_interval" in OcWc to same values as for the the other models * - add counter=0 in case of zero gradient - remove distinction (not-)noisy step within the noise-free step size computation, that is not required at this point - add test case for zero-step * - combine the step-size combination for the noisy and the noise free setting in the adaptive step-size algorithm * - shared "factor_down" for noisy and deterministic case - "factor_down**2" in loop for finding numerically stable regime for faster exit of loop - call the new step-size function for noisy case and delete unused method -> passes all tests in test-oc and test-fhn-noisy - adjust parameters in test case to range [0,1] in Cmat * - revision of documentation - changed variable names for clarity * - revision of docstrings for clean documentation build - fix typos and add comments - rename variables and functions for clarity * - fix mistake in equation * implemented network delays for fhn, hopf, wc/ added tests for all three models * update notebooks, fixed typo in oc.py * removed commented debug code * removed file accidentially imported from other branch * Revert "removed file accidentially imported from other branch" This reverts commit 0543c8a. * - add comments - variable naming for clarity - remove unused code and comments - use fixed seed in test-cases for reproducibility in all cases * corrected small mistake in delay test * delay test cases * cleaned branch, remove files from experiments * - restructure project * - move example file * - adjust imports in example to new project structure * corrected failing test * corrected failing test * - move the calculation of Jacobian matrices to neurolib core modules and adjust imports in the OC submodule * - create subfolders for oc-tests and -examples and adjust naming * fixed issue in step size reduction * fixed issue in step size reduction * - restore documentation-updates: + improved docstrings and comments + better aligned to PEP + clear variable naming * fixed bug in time delay * delete check zero in cmat/ run model once at initilaization/ revise example notebooks/ fix bugs in step_size and delay * revise test files * correct typo in jacobian * correct typo in jacobian * cost functional restructure * update test wc * update test wc * update test wc * update test wc * changed chdir in control examples * revision * added test for weights dictionary * Update README.md * Update README.md * Update README.md * Delete CONTRIBUTING.md * Delete README.md * start implementation oc aln * implemeted bug fixes: aln delayed exc feedback, wc noise, wc&fhn&hopf copy params * time seires variables * fixed bug in aln implementation * time dependent variables * fixed mistake * Update README.md * Update README.md * time dependend variables and init * notebook description * implementation * aln implementation * added gradient as self.gradient * aln imp * implementation without params.Dmat_ndt * functioning implementation except for sigmas, adaptation * functioning implementation except for sigmas, adaptation * sigma implementation, IA missing * apparently works with adaptation * minimal version of adaptation control * finish aln implementation including adaptation current * finish aln implementation including adaptation current * refactoring * merge neurolib updates * network implementation * finalize(?) aln * remove files * refactor implementation and finish example notebook * finalize tests * replace Vmean with analytical function * finish test cases * finalize aln implmentation * added Dxdoth in hopf and fhn * adjust fhn, hopf, wc model_params as in aln * pass N, V, T for iterations * refactor compute_gradient function * update comments * fix bug in network input aln * revise example notebooks * initialize. for implementation, wait for aln * merge aln into OCdev * cleaned up repository * clean up * Delete workflow.txt * move zero_ste_encountered in deterministic computation * implemented cost interval and added test * checkout files from master * fixed solve_adjoint * differentiate static and time-dependent inputs * update example * revert example change * update wc for baseline and dynamical inputs * revise test wc * revise test wc * revised cost functional tests * revised remaining test files * moved get_xs, get_xs_delay and update_input to oc.py * refactoring tests * state vars as dict * remove test notebook * update aln model with correct input_vars * merging * finish test revision * indexing in time_integration file via dictionary in all models * remove comments * add adjust shape method for inputs, refactoring * moved example files to main folder * refactor aln oc test * refactor etst cases * remove unnecessary parameter * solve_adjoint revision, WC notebook * refactor tests * Update timeIntegration.py * Update plot_oc.py * shorten example runtime * Delete examples/example-5.6-oc-aln-model-noisy.ipynb * Delete examples/example-5.2-oc-phenomenological-model-noisy.ipynb * Update plot_oc.py * Update cost_functions.py * added test for solve_adjoint * Update test_oc.py * Update oc.py * Update oc.py * fix bug in WC jacobian * Rename example-5.3-oc-wc-model-deterministic.ipynb to example-5.2-oc-wc-model-deterministic.ipynb * Rename example-5.4-oc-wc-model-noisy.ipynb to example-5.3-oc-wc-model-noisy.ipynb * Rename example-5.5-oc-aln-model-deterministic.ipynb to example-5.4-oc-aln-model-deterministic.ipynb * Update README.md * Update README.md * Update README.md * Update README.md Co-authored-by: Caglar Cakan <[email protected]> * move plot_oc to neurolib.utils * restore plot_oc.py in correct form --------- Co-authored-by: Martin <[email protected]> Co-authored-by: Caglar Cakan <[email protected]>
- Loading branch information