how do i apply maximum likelihood estimation for a gaussian distribution?
조회 수: 3 (최근 30일)
이전 댓글 표시
I have written a short code of converting an image into normal distribution as follows;
a=imread('lena.jpg'); A=rgb2gray(a); P1=im2double(A); K = P1(:) PD=fitdist(K,'normal')
Now how do i apply Maximum likelihood on it to get the estimates of mean and std. deviation?
댓글 수: 0
답변 (1개)
Brendan Hamm
2015년 12월 28일
Maximum Likelihood estimates for a normal distribution would be:
mu = mean(K);
sigma = std(K,1); % 1 for population standard deviation.
However, when we fit Normal distributions we use the Best Unbiased Estimate, which is:
mu = mean(K);
sigma = std(K); % Sample standard deviation
These values can be found in the PD object you fit:
muFit = PD.mu;
sigFit = PD.sigma;
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!