필터 지우기
필터 지우기

How to solve unknown elements of a matrix in mle function?

조회 수: 2 (최근 30일)
Mithun Ghosh
Mithun Ghosh 2018년 9월 26일
댓글: Viren Gupta 2018년 10월 4일
I have been trying to find the unknown value of a basis function by using mle estimation method. My basis function consists of basis(x,k) where x is the data and k is the unknown parameter with (5X1) dimension say[k(1), k(2),k(3),k(4),k(5)]. My liklihood function estimation is like:
function Z=bbasis(x,k)
k=[k(1), k(2),k(3),k(4),k(5)];
z=[];
for i=1:5
Z=[x-k(i)];
z=[z,Z];
end
end
x=rand(20,1);
y=rand(20,1);
F=ones(20,1);
f = @(x,w) (2*3.1416)^-(20)*(det(bbasis(x,w)*rand(10,10)*bbasis(x,w)'))^(-.5)*exp(-.5*(y-F)'*inv(bbasis(x,w)*rand(10,10)*bbasis(x,w)')*(y-F))
lk=mle(x,'pdf','f','start',[0 0 0 0 0 ])
*I am getting the following error:*
Error using mlecustom (line 93)
The 'pdf' parameter value must be a function handle or a cell array
containing a function handle.
Error in mle (line 237)
phat = mlecustom(data,varargin{:});
  댓글 수: 3
Mithun Ghosh
Mithun Ghosh 2018년 10월 1일
Thanks, I corrected that dimensional mismatch problem and redefine pdf which should be okay. But it is still giving me the same error.
Viren Gupta
Viren Gupta 2018년 10월 4일
have you updated the changes in the question above? If yes, then still there is dimension problem. bbasis1 returns 20*1 matrix and multiplying that with rand(10,10) is wrong. I suggest you to try giving some sample inputs to your pdf function and see if that works before working on mle first.

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by