A Bayessian Optimization library for optimization problems for neural simulations. This release works for Axonsim (Matlab) and Cajal/AxonML (Python).
# Install virtualenv
pip install virtualenv
# Create a virtual environment named venv
virtualenv venv
# Activate the virtual environment
# On Linux or macOS
source venv/bin/activate
# On Windows
venv\Scripts\activate
# Install required packages
pip install -r requirements.txtIn case you want to solve Matlab problems (e.g. Axonsim), install the required matlab engine (the default pip wheel is currently Matlab 2026a).
You can check the version by opening MATLAB and running the command: version
So for instance, if you don't have 2024a version, but your engine for Matlab is 2023b you can run the following command:
# Install matlabengine for Matlab version 2023b
pip install matlabengine==23.2.3
# Or in the case of 2024a
pip install matlabengine==24.1.2For more information: https://pypi.org/project/matlabengine/
-
Install Cajal following the instructions: Github-Cajal
-
Install AxonML following the instructions: Github-AxonML
Note: You will likely need to first install MPI4 in your system (MPI4 ReadTheDocs). This is described in the Cajal installation instructions. Then install mpich using pip:
apt install -y mpichMake sure that the path_configuration in configuration file is complete. Most importantly, specify the paths to the simulators (axonsim_path, cajal_path and axonml_path) as needed. Optionally, specify the save_path to the folder where you want to save the results.
In Linux
sh run.sh- The bash script takes care of adding the required folders to PYTHONPATH and calls /api/app.py
- Open the interface within a browser per default: https:localhost:10000, or the one specified in the configuration file.
More details on the GUI usage bellow.
First install online-neuro as a package, or, add its folder in the Python path of your environment. Run an experiment as follows:
python3 api/app.py -FLAGSFlags:
options:
-h, --help show this help message and exit
--target {Python,MATLAB}
Specify the target simulator: 'Python' or 'MATLAB'
--flask_port FLASK_PORT
If provided, partial results are sent to the flask
server for plotting and reporting
Global configuration:
--config CONFIG Path to or JSON string of the global configuration
Specific configurations:
--connection_config CONNECTION_CONFIG
Path to or json string of the connection's configuration
--model_config MODEL_CONFIG
Path to or json string of the model's configuration
--problem_config PROBLEM_CONFIG
Path to or json string of the problems's configuration
--optimizer_config OPTIMIZER_CONFIG
Path to or json string of optimizers's configuration
--path_config PATH_CONFIG
Path to or json string of paths's configuration
Configuration flags can accept text or file paths. It is easier and more readable to pass file paths. For more specifications, use the examples in config folder and the config readme.md
Description: Classification problems where one or multiple circles need to be detected in a 2-dimensional search space. These problems can be be modelled with SVGP and log-likelihood.
Simulator(s): Python and Matlab
GUI: Yes
Notebooks:
Description A regression problem with smooth surfaces normally in a two inpust pace with predefined parameters a = 1 and b = 100.
Simulator(s): Python and Matlab
GUI Yes
Notebooks
- None
Description A two objective problem with two inputs. Optimizing towards joined targets using Pareto Front.
Simulator(s) MATLAB and Python
GUI Yes (Only MATLAB)
Notebooks
Description A multioutput regression problem where the input parameters of a pulse are used to predict the time response of a fixed electrode.
Simulator(s) MATLAB
GUI Yes
Notebooks
Description A classification problem using Sparse GP to discover configurations of two electrodes with single, double, or ramp pulses. Objective is to generate an AP on one end and block its propagation.
Simulator(s) MATLAB
GUI Yes
Notebooks
- Not implement, see Cajal example instead
- Pending.
Cajal is a Python axon simulator which has better interfacing than Axonsim (MATLAB). Objective over time is to integrate more advance experiments in this section
Description A classification problem using Sparse GP to discover configurations of two electrodes with single, double, or ramp pulses. Objective is to generate an AP on one end and block its propagation.
Simulator(s) Python
GUI Yes
Notebooks -(GP Cajal AP blocking)[notebooks/GP_Cajal_AP_blocking.ipynb]
Description A regression problem using a GP/ANN to find parameters that model the time delay before the AP arrives to a given node, or the configuration that reaches it (minimization).
Simulator(s) Python
GUI No
Notebooks -(GP Cajal sinusoid delay)[notebooks/GP_Cajal_sinusoid_delay.ipynb]









