필터 지우기
필터 지우기

why do I get zero likelihood!

조회 수: 1 (최근 30일)
narges darvish
narges darvish 2013년 4월 5일
I am trying to use fmincon for optimizing my likelihood, but while I get the solutions the log likelihhod is zero and two of the parameters are equal to the specified initial values.
  댓글 수: 2
Walter Roberson
Walter Roberson 2013년 4월 5일
Which exit status do you get?
narges darvish
narges darvish 2013년 4월 8일
Hi Walter, the exit is equal to one.

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

채택된 답변

Tom Lane
Tom Lane 2013년 4월 9일
Are you using the Statistics Toolbox mle function in combination with the Optimization Toolbox fmincon function? Can you try computing the pdf of your data using your initial parameter values, to make sure the pdf is positive for each data point?
One trick may be to make the distribution more diffuse as opposed to more concentrated. In the following example, the first mle invocation is successful using sigma=exp(3). The second fails using sigma=exp(0), because the data points are too far out in the tails of the normal distribution with mean 20 and standard deviation exp(0)=1.
x = randn(100,1);
mle(x,'pdf',@(c,mu,logs)normpdf(x,mu,exp(logs)),'start',[20 3],'optimfun','fmincon')
mle(x,'pdf',@(c,mu,logs)normpdf(x,mu,exp(logs)),'start',[20 0],'optimfun','fmincon')
  댓글 수: 1
narges darvish
narges darvish 2013년 4월 10일
Thanks Tom, I am only using the Optimization toolbox. I think there was a problem with variables definition. I changed them to global and now it works, but I get zero exit!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Nonlinear Optimization에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by