Marine ecosystem models are important to identify the processes that affects for example the global carbon cycle. Computation of an annual periodic solution (i.e., a steady annual cycle) for these models requires a high computational effort.
To reduce this effort, we approximate an exemplary marine ecosystem model by different artificial neural networks (ANNs). We used a fully connected network, then applied the sparse evolutionary training (SET) procedure, and finally applied a genetic algorithm (GA) to optimize both the network topology.
To clone this project with git run:
git clone https://github.com/slawig/bgc-ann.git
The project consists of the Python packages ann and Python scripts in the directory ArtificialNeuralNetwork to start the approximation using an ANN.
The Python package util is available in the repository https://github.com/slawig/bgc-util.git.
The Python packages util, initialValue, timesteps and sbo were moved into separate repositories:
- util: https://github.com/slawig/bgc-util.git.
- initialValue: https://github.com/slawig/bgc-initialValue.git.
- timesteps: https://github.com/slawig/bgc-timesteps.git.
- sbo: https://github.com/slawig/bgc-sbo.git.
This package summarizes the functions to approximation a marine ecosystem model by means of an artificial neural network (ANN) and, thus, to reduce the computational effort using this approximations as initial concentrations for a spin-up calculation.
This package contains four subpackages:
- network: Contains basic functions for using neural networks and the SET algorithm.
- database: Consists of functions to store the results of the approximation in a database and read them out again.
- evaluation: Summary of functions to calculate the approximations using the prediction of an ANN.
- geneticAlgorithm: Contains functions to train an ANN using a genetic algorithm.
Python scripts exist for the application to start the simulations and evaluate them.
The scripts for the approximation by means of artificial neural networks are available in the directory ArtificialNeuralNetwork
. There are three groups of scripts:
- Creation and training of ANNs:
The script
ANN_CreateNeuralNetwork.py
can be used to start the creation and training of new ANNs. For this purpose, the configuration of the ANN is read from the configuration fileANN_Config_FCN.py
(for a fully connected network) orANN_Config_SET.py
(using the SET algorithm). - Evaluation of the approximation using an ANN:
- The script
ANN_Evaluation.py
starts the evaluation of the approximation of a steady annual cycle by an ANN. For this purpose, the scriptANN_EvaluationJob.py
is called for each parameter vector of the test data to compute different approximations using the prediction of the ANN. - The script
ANN_InsertDatabase.py
writes the evaluation results into a database.
- The script
- Visualization of the results:
- The script
ANN_Plotfunction.py
provides different functions to visualize the results. - The script
Plots_ANN_Paper.py
generates from the data provided on Zenodo the figures that are shown in the draft of the paper with the title "Approximation of a marine ecosystem model by artificial neural networks designed using a genetic algorithm". A description of how to use this script is included in the Wiki.
- The script