How to calculate MSE for Gaussian histogram?

조회 수: 3 (최근 30일)
studentmatlaber
studentmatlaber 2021년 9월 22일
댓글: Image Analyst 2021년 9월 23일
I fit the Gaussian distribution with the histfit command. I want to calculate MSE but I have no idea how to do it.
Can this approach be used for MSE calculate?
hhf = histfit(noise_filt)
df = fitdist(noise_filt(:), 'Normal')
y = normpdf(hhf(1).XData,df.mu,df.sigma);
mse = mean((y - hhf(1).YData).^2)
mse = 1.183472134374673e+07

채택된 답변

Image Analyst
Image Analyst 2021년 9월 22일
I'd probably do it on the original data, not the histogram
meanValue = mean(noise_filt);
mse = mean((noise_filt - meanValue) .^ 2)
  댓글 수: 2
studentmatlaber
studentmatlaber 2021년 9월 23일
Thank you so much. can this approach also be used for weibull distribution?
Image Analyst
Image Analyst 2021년 9월 23일
I don't see why not. The MSE doesn't care what produced the reference and test data.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by