Fitted error vs error of original fit

11 ビュー (過去 30 日間)
katara
katara 2020 年 9 月 11 日
回答済み: Ayush Gupta 2020 年 9 月 15 日
I am asked to compare the fitted error to the error of original fit of a set of data labeled data_valid_fit. Using a given equation I calculated the fitting error as below:
% The data estimated on the validation set with r and y0
valid_data_fit = y0.*exp(r*tvalid)
% Computing fitting error
e = 1/length(t)*sqrt(sum((valid_data_fit - datavalid).^2))
If my function is y= y0*exp(r*t) and I calculated datafit using that function and:
y0= 149.4515
r= 0.0330
t = [ 0, 13, 36, 46, 61, 64, 70, 75, 78].
How can I calculate the error of original fit?

回答 (1 件)

Ayush Gupta
Ayush Gupta 2020 年 9 月 15 日
There seems to be a confusion between error of original fit which is calculated previously whereas fitted error of a fit is the model parameter which is known as MSE (Mean Squared Error). For examples on how to calculate the MSE, read the documentation here.

カテゴリ

Help Center および File ExchangeLeast Squares についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by