maximizer of a function including integral
1 view (last 30 days)
Show older comments
I want to get the maximizer of a function contain integral
function f = score(g)
g = [b0, b1, a];
integral = @(x) (exp(b0+b1*x)./(1+a*exp(b0+b1*x))).^yi.*(1./(1+a*exp(b0+b1*x))).^(1/a).*exp(-(x-mi).^2/(2*tau));
f = -log(quadl(integral, mi-5*sqrt(tau), mi+5*sqrt(tau)));
where yi and mi are given (the data), g is the variable I want to solve, x is the integration variable.
I used the function
fminsearch(@(g) score(g), g0)
to get the maximizer. However, the warning
...
In fminsearch at 320
...
Warning: Maximum function count exceeded; singularity likely.
keep popping out.
What can I do to check the program and improve it? The problem itself should be theoretically sound, but I'm not quite familiar with the numerical algorithm.
Thank you so much!!!
0 Comments
Answers (0)
See Also
Categories
Find more on Fourier Analysis and Filtering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!