0

since I am trying to find the fitting parameters for a model, sometimes I get this:

enter image description here

basically I have to have that the green curve (my model) at certain point should stop to oscillate, like the target (the blue one). The problem is that I am calculating the error using the sum of the squares and trying to minimize it with ModeFrontier ( an optimization software, that chose the parameter of my model trying to minimize the error). But if I calculate the error in that way,I get that the green curve in the picture is the best fit.

How can I calculate the error trying to eliminate the oscillation? Thanks

1 Answers1

0

Either your model might be wrong, or the algorithm of model parameter estimation got stuck in a local minima.

One can check if the last one is the case by changing the initial guesses of each model parameter (assuming that your used algorithm allows you to do that).

  • yes, the model is not perfect, but I would like that the algorithm for model parameter estimation tries to find them taking as target the curve without oscillation rather than that one... I have to think some other way to define the error in a way that if I have oscillation the error is big compared to a curve without oscillations. – Italo Persechino Oct 15 '16 at 12:41
  • @ItaloPersechino You could try a weighted least squares, and increase the weight in the area in which the oscillations occur. – Kwin van der Veen Oct 15 '16 at 12:54
  • what if I extract the last portion of the Y (it's an array) and I calculate the variance and I try to minimize it? Could it work in your opinion? – Italo Persechino Oct 15 '16 at 16:00