Simultaneous Constant Optimisation for Curve Fitting

조회 수: 3 (최근 30일)
TheGymnopedist
TheGymnopedist 2024년 4월 12일
댓글: Torsten 2024년 4월 12일
I have a set of 15 constants which I need to optimise to obtain a minimum WSSE (error). These constants are part of a function file which is called by an ode solver to model the concentration of different species over time, and this modelled data is compared to experimental data, so that the optimum value of the 15 constants can be determined.
Any advice on how to achieve this would be much appreciated, as doing it manually has led to finding local minimums.
EDIT: Extra info in comment.

답변 (1개)

John D'Errico
John D'Errico 2024년 4월 12일
편집: John D'Errico 2024년 4월 12일
Do NOT manually search through a 15 dimensional space for a solution. You are just wasting your time, and this is why tools are provided to perform optimization and such searches for you.
Use a look like nlinfit, or lsqcurvefit, or lsqnonlin. Many others too, but that is where you should be looking.
Since you comment about finding local mins, recognize that even such a tool will NOT guarantee finding a globally optimal solution. It can easily stop in a local min, as long as the local minimum does not have any direction to move to that offers an improvement in the objective. This is a function of choosing good starting values for the search. Choose crappy starting values, or even random ones, and expect randomly crappy results.
Despite the many people who plead for a way to automatically choose good starting values, that is an impossible task. Sorry. At best you can use a tool like GA to perform the search. It can improve your results, though it will take more time to perform the search.
Since I know you will ask for a direct example on how to use those tools for your problem, READ THE HELP FOR THE TOOL YOU WILL TRY TO USE. All of those tools have examples of use already provided.
  댓글 수: 2
TheGymnopedist
TheGymnopedist 2024년 4월 12일
Hi John, thanks for the advice so far. I have come across these tools in my search; however, I am not sure how to implement them when using a system of odes. lsqcurvefit seems the most promising; however, I am unsure as to how the intital guesses for the constants are assigned to the correct constants (ka1-ka15) in the function file.
The example shows x(1) & x(2) being used to denote the variables to optimise; however, as my function file (dmdt) is a system of odes, m(1)-m(17) are the system of odes, not the select constants used in those odes.
From the examples, it would appear that the initial guesses will therefore be taken to be the initial guesses to the system of odes (generating the 17 curves), not the constants themselves. Any advice on how to amend for this?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by