Minimum of function by vector parameters
4 ビュー (過去 30 日間)
古いコメントを表示
[EDIT: Fri May 13 15:01:56 UTC 2011 - Clarify - MKF]
Hello
I'd like to find the minimum of the following function
function y=probability_financial(a,b,w,pm,z)
% w=[w1,w2]
% a=[a1 a2]
% b=[b1 b2];
% z-matrix (2x2) is defined,
% pm = [pm1, pm2]-vector, is defined
y = abs(pm(1)-w(1)/(1+exp(-a(1)-b(1)*z(1,1)))-w(2)/...
(1+exp(-a(2)-b(2)*z(1,2))))+abs(pm(2)-w(1)/...
(1+exp(-a(1)-b(1)*z(2,1)))-w(2)/(1+exp(-a(2)-b(2)*z(2,2))));
end
by the following variables w=[w1,w2], a=[a1 a2] b=[b1 b2]
Would you be so kind to explain to me how to implement this?
Thanks for your answers!
回答 (1 件)
Walter Roberson
2011 年 5 月 13 日
As you have an excess of unconstrained free variables, you can make some arbitrary choices and minimize exactly at those choices.
For example, Let
w(2) = 0
a(1) = arbitrary real value (does affect other variables)
a(2) = any real value (contribution will be ignored)
b(2) = any real value (contribution will be ignored)
Then
w(1) = pm(1)*exp((-a(1)*z(1,1)+a(1)*z(1,2)+ln(pm(2)/pm(1))*z(1,1))/(z(1,1)-z(1,2)))
b(1) = -ln(pm(2)/pm(1))/(z(1,1)-z(1,2))
will minimize to y = 0
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!