Problem with optimization using fminunc
Mostra commenti meno recenti
Using fminunc for optimization matlab show me the message
"Computing finite-difference Hessian using user-supplied objective function."
The options I use in fminunc are:
options=optimset('Display','notify','MaxIter',10^6,'MaxFunEvals',10^6,'TolX',10^-30,'TolFun',10^-30, 'GradObj','off','Hessian','off','LargeScale','off','LinesearchType','cubicpoly','InitialHessType','user-supplied','InitialHessMatrix',1,'HessUpdate','steepdesc')
The objective function is:
function val = custom_pdf(A,data);
n=3; m=2;
sigma=A(m+2);esi=exp(sigma); lamda=A(m+3);ela=exp(lamda);
dep=data(1:n,1); regs=data(1:n,2:m+2); beta=A(1:m+1)'; ee=dep-regs*beta; fact=ee./esi;
val=(2./esi).*(normpdf(fact)).*(normcdf(-ela.*fact));
What I must to do to solve this problem?
Risposta accettata
Più risposte (1)
Alan Weiss
il 11 Ago 2016
0 voti
Your options make no sense to me. Remove all your options and I suspect that your problems will vanish.
Alan Weiss
MATLAB mathematical toolbox documentation
3 Commenti
Christos Papadimitriou
il 11 Ago 2016
Alan Weiss
il 11 Ago 2016
Yes, you have an old version of MATLAB, but you should still be able to use it to minimize. Take a look at the documentation sections about what to do when the solver fails and what to do when the solver might have succeeded or when the solver takes too long.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
John BG
il 11 Ago 2016
Herr Weiss MATLAB does not get old, Christos just has an outdated version, he only needs to drive test R2016a
Categorie
Scopri di più su Solver Outputs and Iterative Display in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!