How to calculate MSE for Gaussian histogram?
3 次查看(过去 30 天)
显示 更早的评论
I fit the Gaussian distribution with the histfit command. I want to calculate MSE but I have no idea how to do it.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/746294/image.jpeg)
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
0 个评论
采纳的回答
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 个评论
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 Exchange 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!