![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/480608/image.png)
quantifing goodness of fit between two data sets
21 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
yuval steinberg
il 6 Gen 2021
Commentato: Star Strider
il 7 Gen 2021
Hi everyone,
I have two data sets, one is empirical data gathered from an experiment and the other is data from a model that is suppose to simulate the experiment. Eventually it's just two vectors. I want to quantify the goodness of fit between the model and empirical data to a single number. how can I do this?
Thanks!!
0 Commenti
Risposta accettata
Star Strider
il 6 Gen 2021
If ‘Q’ are your data and ‘Qest’ are the model values, one option is to compute the Coefficient of determination (
) value:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/480608/image.png)
RMSE = sqrt(mean((Q - Qest).^2)); % Compute RMSE
OLSCF = @(b) sum((Q-Qfcn(b,yez)).^2);
SStot = sum((Q - mean(Q)).^2);
SSres = OLSCF(B);
Rsq = 1 - (SSres/SStot); % Compute R-squared
.
6 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!