필터 지우기
필터 지우기

Vectorized gradient based optimizers

조회 수: 2 (최근 30일)
mahmoud tarek
mahmoud tarek 2019년 12월 30일
댓글: Matt J 2020년 1월 15일
Is there any vectorized gradient based optimizer available ? Even outside matlab ?

채택된 답변

Matt J
Matt J 2019년 12월 31일
편집: Matt J 2019년 12월 31일
As long as you are willing to supply the gradient, you can vectorize the minimization of N objectives,
by applying fminunc to the consolidated objective,
or analogously with fmincon if each problem has constraints.
  댓글 수: 22
mahmoud tarek
mahmoud tarek 2020년 1월 15일
yes, i can and i am trying now to provide the gradients (if possible) of my simulations function.
Do you have any documents or ideas on how to do that ?
Matt J
Matt J 2020년 1월 15일
The chain rule,
If an analytical calculation is too difficult, you can also try your own vectorized finite difference method to find the Jacobian of your simulation function. From that, it should be easier to find the total derivative of your objective using the chain rule.
delta = small_number;
Y0=simulation(X); %
Jacobian=nan(size(X)); %to hold the result
for i=1:11
Xp=X;
Xp(:,i)=Xp(:,i)+delta;
Yp=simulation(Xp);
Jacobian(:,i)=(Yp(:,i)-Y0(:,i))/delta;
end

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

추가 답변 (0개)

카테고리

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