Optimize two dependent equations
4 次查看(过去 30 天)
显示 更早的评论
I am trying to fit two curves that are dependent on each other. Following are the equations:
y1(t+1) = (param1 * y1(t) * (param2-y1(t))) + (param3 * y2(t) * (param2-y1(t)))
y2(t+1) = (param4 * y2(t) * (param5-y2(t))) + (param6 * y1(t) * (param5-y2(t)))
Our aim is to optimize the values of all the parameters such that we are able to model y1 and y2 sequence close to observed. We have ground truth to compute error (SSE).
How can we optimize two sets of questions that are dependent on each other? I have been looking at lsqnonlin but I am not sure how to optimize in this setup.
0 个评论
回答(2 个)
Mukul Rao
2017-12-6
Hi, if you are looking to optimize both equations together, I would recommend looking at some of the multi-objective optimization functions in MATLAB.
Your goal would be to minimize a vector of [SSE(y1) ; SSE(y2) ], unlike a scalar which is typical of single objective optimization problems.
0 个评论
Torsten
2017-12-7
编辑:Torsten
2017-12-7
Use lsqnonlin with the f-vector defined as
f=[y1(t1)-y1_obs(t1),y1(t2)-y1_obs(t2),...,y1(tn)-y1_obs(tn),y2(t1)-y2_obs(t1),y2(t2)-y2_obs(t2),...,y2(tn)-y2_obs(tn)]
Here, given the parameters from lsqnonlin, y1(t1),...,y1(tn),y2(t1),...,y2(tn) are calculated from your above formulae starting from y1(t0) and y2(t0).
If y1(t0) and y2(t0) are also unknown, you can include them in the vector of unknown parameters.
Best wishes
Torsten.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Nonlinear Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!