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!