ICB-DCM/PESTO

Error with NLLH (objective function undefined at initial point)

yannikschaelte opened this issue · 0 comments

When passing functions as 'negative log-likelihood', e.g. the simple jakstat model, it can happen that getMultiStarts() returns with an error, saying that

Error using barrier
Objective function is undefined at initial point. Fmincon cannot continue.

Error in fmincon (line 798)
[X,FVAL,EXITFLAG,OUTPUT,LAMBDA,GRAD,HESSIAN] = barrier(funfcn,X,A,B,Aeq,Beq,l,u,confcn,options.HessFcn, ...

Error in getMultiStarts (line 268)
fmincon(negLogPost,... % negative log-likelihood function

Error in run_jakstat (line 23)
parameters_res = getMultiStarts(parameters,nllh,options.MS);

This seems to be due to a sign error in objectiveWrap.m, line 100ff., where we always want +inf, which is then interpreted correctly in getMultiStarts().