Opened 6 months ago

Last modified 4 hours ago

## #2925 new feature request

# Support for AutoDiff-based optimization of coefficients for symbolic regression models with auto-regressive variables

Reported by: | gkronber | Owned by: | gkronber |
---|---|---|---|

Priority: | medium | Milestone: | HeuristicLab 4.x Backlog |

Component: | Problems.DataAnalysis.Symbolic | Version: | |

Keywords: | Cc: |

### Description

We aim to model dynamical systems using a set of differential equations for observed variables of the system. The proposed approach is to simulate the system forward in time using numerical integration (e.g. Runge-Kutta). If we want to combine this with our gradient-based optimization of coefficients then it is necessary to calculate gradients using AutoDiff over all steps of the numeric integration. For this it is probably necessary to extend the class for optimization of coefficients (aka ConstantsOptimizer) and to provide a symbol for auto-regressive variables where it is possible to set a gradient value.

E.g. for a uni-variate model: y'(t) = a * y(t)

we have:

- y'(0) = a y(0)
- y'(1) = a y(1) = a (y(0) + a y'(0)) = a y(0) + a²y'(0)

using a naive integration step

and:

dy'(0)/da = y(0)

which we need to calculate the dy'(1) / da

i.e.

dy'(1)/da = y(0) + 2 a dy'(0)/da = y(0) + 2 a y(0)

and so on for each time step.

### Change History (31)

### comment:1 Changed 6 months ago by gkronber

### comment:2 Changed 6 months ago by gkronber

r15964: first exploratory implementation of AutoDiff for modelling of dynamical systems

### comment:3 Changed 6 months ago by gkronber

### comment:4 Changed 6 months ago by gkronber

r15970: added expressions for latent variables and allow parameterization of the number of integration steps

### comment:5 Changed 3 months ago by lkammere

r16126: added constants values to tree in result view and minor bugfix when initializing problem.

### comment:6 Changed 3 months ago by gkronber

### comment:7 Changed 3 months ago by gkronber

- added support for multiple training episodes,
- added simplification of models,
- fixed a bug in the normalization based on target variable variance

### comment:8 Changed 3 months ago by gkronber

r16154: bug fix for the extraction of target values (missed when introducing episodes)

### comment:9 Changed 3 months ago by gkronber

r16155: allow tuning individual parameter vectors for episodes (using the same structure)

### comment:10 Changed 2 months ago by gkronber

TODO: show line chart of integrated latent variables.

### comment:11 Changed 2 months ago by gkronber

r16214: added datasets from supplementary material for "distilling free-form laws ..." (oscillator, pendulum, double pendulum, ...)

### comment:12 Changed 2 months ago by gkronber

r16215 added sin and cos functions

### comment:13 Changed 2 months ago by gkronber

- added comments about parameter identification for differential equation models
- added source code of cvodes library (part of sundials) which provides functionality to calculate gradients for the parameters of partial differential equation models efficiently using the 'adjoint state method'.
- added compiled version of cvodes

### comment:14 Changed 2 months ago by gkronber

r16225: first working version of CVODES integration

### comment:15 Changed 2 months ago by gkronber

r16226: added vector access methods

### comment:16 Changed 2 months ago by gkronber

r16227: changed test case to linear oscillator

### comment:17 Changed 2 months ago by gkronber

r16245: worked on integration of CVODES library

### comment:18 Changed 2 months ago by gkronber

r16246: working example with forward sensitivity analysis

### comment:19 Changed 2 months ago by gkronber

r16248: extracted CVODES external methods into a separate class

### comment:20 Changed 2 months ago by gkronber

r16249: extracted Vector into a separate class

### comment:21 Changed 2 months ago by gkronber

r16250: preparations to switch between HL ODE solver and CVODES

### comment:22 Changed 8 weeks ago by gkronber

r16251: implemented interface to CVODES solver with forward sensitivity calculation.

### comment:23 Changed 8 weeks ago by gkronber

r16253: fixed memory leak and fixed bug in determination of integration time span

### comment:24 Changed 8 weeks ago by gkronber

r16254: made usage of x86 native library explicit.

### comment:25 Changed 8 weeks ago by gkronber

r15256: added x64 version of CVODES as well as dispatching code for x86 and x64.

### comment:26 Changed 7 weeks ago by gkronber

r16268: created a separate algorithm (similar to NLR but for parameter identification of ODE systems) for debugging of the parameter optimization and fixed a problem with the order of items in the checkedItemCollection for TargetVariables

### comment:27 Changed 3 weeks ago by gkronber

r16329: made several extensions in relation to blood glucose prediction

- added sqr function,
- added outputs for latent variables (linechart and model),
- added optimization of initial values for latent variables (for each episode separately)
- TODO: test with CVODES (so far only our own integration scheme has been tested)

### comment:28 Changed 3 weeks ago by gkronber

TODO: for testing: estimate parameters for model (including initial values for hidden variables) based on the immediately previous data points.

### comment:29 Changed 3 days ago by gkronber

r16386: merged changes r15972:16382 (HEAD) from trunk to branch

### comment:30 Changed 11 hours ago by gkronber

r16395: removed unnecessary usings

### comment:31 Changed 4 hours ago by gkronber

r16398: small changes

**Note:**See TracTickets for help on using tickets.

r15962: created branch for ticket