Skip to content

Latest commit

 

History

History
121 lines (100 loc) · 5.68 KB

README.org

File metadata and controls

121 lines (100 loc) · 5.68 KB

DEParamEst

Parameter estimation experiments for ordinary differential equation models.

This repository has been developed as a deliverable for my master’s thesis titled “A proposal of new methods for parameter estimation in ordinary differential equations”.

Abstract

Chemical kinetics studies models which describe the behavior of chemical reactions. For the model to act as expected and be valid, its reaction rate coefficients must be in accordance with the reality of the phenomenon. In this context, this work presents new ways of estimating these values. Parameter estimation problems, also known as Inverse Problems, are, especially in this context, notoriously difficult to deal with due to ill conditioning and the non-convexity of the optimization surface. We propose a new method that takes into account properties of Ordinary Differential Equations, incorporating techniques from numerical integration to the estimator. This approach aims at smoothing out the optimization surface, allowing for easier convergence to its global minimum. Coined Data Shooting, we have found that its computational cost are up to 3 orders of magnitude lower than the classic alternative, Single Shooting. Its accuracy, on the other hand, is inferior for more complex cases. The cost of smoothing the optimization surface is the injection of a bias to the model, an exchange known in the machine learning field as bias-variance tradeoff. Given such characteristics, we propose the use of this method as the first step in a two-step regularization process, developed in the literature with the purpose of dealing with the ill conditioning arising in Inverse Problems. The creators of this method have demonstrated that regularization brings notable benefits when dealing with parameter estimation problems. However, they note that in order to use this method researchers must have good a priori reference values for the parameters they wish to estimate. Unfortunately, this is not always possible in practice. Thus, the second method we present, entitled Data to Single Shooting, consists of using the estimated values from Data Shooting, in a first step, as such reference values in a Tikhonov regularization of the Single Shooting method, on the second step. Even though Data Shooting does not generate as accurate results as the alternative classical method in some of the selected test cases, it is generally able to avoid getting stuck in local minima present on the optimization surface generated by Single Shooting. With that, Data Shooting is able to provide good initial estimates, in an efficient manner. The results we have obtained show that the Data to Single Shooting method has a good performance in most cases, being especially effective in problems of higher complexity.

Keywords: parameter estimation, inverse problems, ordinary differential equations, ill conditioning, non convexity, regularization

Project structure

This project has been developed entirely in the Julia language.

The src folder holds the code. Inside it you can find the calc and plot folders.

The calc folder has the code for conducting the experiments. It generates the data for comparing the efficiency of the different parameter estimation methods.

plot, on the other hand, stores the code used for creating the plots shown in the thesis. The modules inside plot are the ones that treat the data generated by the main program in calc and in turn use them to generate useful visualizations for easier interpretability of the results.

Usage

The run.sh file is a bash helper that sets the appropriate parameters for running the main routine of this project.

#!/bin/sh

export JULIA_NUM_THREADS=16
save_path='./data/results'
test_cases='[1,2,3,4,5,6,7,8,9]'
num_samples='[10]'
variance_multiplier='[0.1]'
julia ./src/calc/experiment.jl $save_path $test_cases $num_samples $variance_multiplier

The experiment.jl file holds the main piece of the code. It takes four command line arguments. The first one, save_path in the script above, takes a folder in which to store the experiment results in ~JLSO~ format.

The second, test_cases, must be a list of numbers, each one representing a test case.

The test cases are:

  1. First Order Irreversible Chain Reaction (FIC)
  2. First Order Reversible Chain Reaction (RFC)
  3. Catalytic Cracking of Gas Oil (CCGO)
  4. Bellman’s Problem (BEP)
  5. Methanol-to-Hydrocarbons Process (MHP)
  6. Lotka-Volterra’s Problem (LVP)
  7. Biomass Batch Growth (BBG)
  8. FitzHugh-Nagumo (FHN)
  9. Mitogen Activated Protein Kinases (MAPK)

The third argument, num_samples is a list of number of samples to be simulated for the experiment.

The final argument, variance_multiplier, is a list of numbers that sets the proportion between signal and noise in the simulated data. A multiplier of 0.1 represents adding a noise proportional to 10% of the value of the signal. In practice, this value should not be higher than 0.2, otherwise the noise would end up destroying the signal.

All of the arguments passed must be a bash string so that they can be correctly interpreted inside the main program.

With this script one can easily reproduce the results discussed in the thesis.

Note that with the command export JULIA_NUM_THREADS=16 you can control the number of threads used during the execution of the experiments. Since this process involves stochastic methods, each test case is solved a total of 30 times in order to calculate its metrics and get more realist results. This leads to some points of parallelization, which we take advantage of.