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!