# Rescaling ODE optimization problem with fmincon

2 visualizaciones (últimos 30 días)
Peter Uhl el 15 de Feb. de 2022
Respondida: Ravi el 24 de En. de 2024
Hi everyone. I'm trying to find a best fitting set of parameters for a three dimensional ODE using fmincon. My problem is that most of the parameters are ~0 - 50, but one very small (~10^-10) and another very large (~10^9), which is causing fmincon to end prematurely. I'm only using bound constraints.
I'm trying to do something similar to item 5 here: https://www.mathworks.com/help/optim/ug/when-the-solver-fails.html
But I don't know how to go about this for my problem. My objective funciton calls ode15s and calculates SSE with a time series of data.
Not neccisarily looking for a complete answer, just something to get me on the right track. Appreciate any advice.
##### 1 comentarioMostrar -1 comentarios más antiguosOcultar -1 comentarios más antiguos
Torsten el 15 de Feb. de 2022
For the small parameter, use 1e10*p1, for the large parameter, use 1e-9*p2. Then p1 and p2 will be in the order of 1.

Iniciar sesión para comentar.

### Respuestas (1)

Ravi el 24 de En. de 2024
Hi Peter Uhl,
When handling data that spans a broad range of magnitudes, optimization can become challenging. To address this, applying logarithmic transformations or normalization techniques can be highly effective strategies.
In logarithmic transformation, we consider the logarithms of the parameters rather than the parameters themselves. This way, multiplicative changes in the parameters become additive changes in the log space, which can be easier for the optimizer to handle. We can also try normalizing the parameters such that all values lie in the range [0, 1].
In case of logarithmic transformation, once ‘fmincon’ finds a solution, we transform the logarithm space back to the original space by applying exponentiation.
To solve the premature termination, you can also set the “MaxIter” and “MaxFunEvals” options using “optimset” function to a large number and pass that as parameter to the “fmincon” function. That would also help!
Hope this approach helps you in fixing the issue that you are facing.
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

### Categorías

Más información sobre Choose a Solver en Help Center y File Exchange.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by