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 Center および File ExchangeHistograms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by