how to calculate mean square error?
13 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
studentmatlaber
il 13 Giu 2021
Modificato: Sulaymon Eshkabilov
il 11 Lug 2021
hello everyone, I separated the signals from noise by passing them through a low pass filter. I extracted the histogram of the noiseless signals. I tried to fit in matlab. the optimal distributions seem to be exponential and weilbull. I want to calculate the mean square error for these two distributions. I will use whichever distribution has the least error rate. But I don't know how to calculate mean square error. I would be very happy if you could help me with this subject.
signal=1x512712 double
0 Commenti
Risposta accettata
Sulaymon Eshkabilov
il 13 Giu 2021
Modificato: Sulaymon Eshkabilov
il 13 Giu 2021
Here is the sample code how to compute MSE from the histogram fit model:
x = .... % Your data. You've got it.
% Handle of the figure is needed
HH = histfit(x,Nbins); % HISTOGRAM fit model build. You've got it
%% Separate out the data from HISTOGRAM Plot and Fit Model
Data = get(HH(1),'XData'); % HIST Data
FM = get(HH(2),'YData'); % FIT Model
MD = mean(DATA); % MEAN Of Bins
FM2 = mean(reshape(FM, 2, [])); % Mean Of Bin Edges Fit
ERR = MD - FM2; % ERR
SSE = sum(ERR.^2); % Sum-Squared Error
MSE = mean(ERR.^2); % Mean-Squared-Error
6 Commenti
Sulaymon Eshkabilov
il 11 Lug 2021
Modificato: Sulaymon Eshkabilov
il 11 Lug 2021
Ok. I'll have a look a bit later today.
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!