how to solve the following problem using optimization toolbox?
이전 댓글 표시
I have this estimation problem where I use maximum likelhood estimation to solve it where the problem has pdf of:
f(x)=m1*(1/(sqrt(2*pi)*o_x)))*exp(-0.5*power(z-ux,2)/o_x^2))+(1-m1)*m1*(1/(sqrt(2*pi)*o_y)))*exp(-0.5*power(z-uy,2)/o_y^2));
both are normal distributions (I want to estimate m1, ux,uy,o_x,o_y) using optimisation toolbox
I used fmincon since I am trying to limit the range of possible values (impost constraints on the values of m1, ux,uy,o_x,o_y)
I used a for loop for the main program.
problem.objective = @(y)norm_likelhood_fun(y,z); %%%%z is the data and y is a vector representing vector of values to be estimated
for j=1:100
% problem.x0=(problem.ub+problem.lb)/2;
problem.x0 = rand(5,1);
[y,feval]=...
fmincon(problem);
%y = run(gs,problem);
y_f(:,j)=y;
end
In each loop iteration, different initial values are used to search for minumum( I know the optimiser is sensitive to initial values). My question is how can I reach the convergence (different initial values lead to the same solution). What is the best algorithm suited for this problem?. How can I visualize the data with optimisation problem I have (contour lines)?
댓글 수: 4
Mario Malic
2020년 9월 22일
Provide information on full problem structure, including lb and ub. I am not sure if you need them vectorised/or if it has any benefits in fmincon or just for simplicity.
Values for x0 are in range of [0,1]? Keep in mind, that fmincon is local search, you might end up in one or the other local minima.
Muna Tageldin
2020년 9월 22일
Muna Tageldin
2020년 9월 23일
Mario Malic
2020년 9월 23일
I don't think it's possible, it's 5D problem. Do you really need 10^-30 on TolX and TolFun?
Issue with your options are, that your MaxIter, TolFun and TolX are from optimset, but you use optimoptions. I don't know what values you get in fval (rename from feval, as feval is a function), so try these options.
options = optimoptions('fmincon','Display','iter-detailed','Algorithm','sqp','MaxIterations',10000, ...
'StepTolerance',10^-10,'TolFun',10^-10,'OptimalityTolerance',1e-12, 'Plotfcn', @optimplotfval);
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!