computing error on least square fitting

10 views (last 30 days)
Sumera Yamin
Sumera Yamin on 13 Aug 2020
Edited: Sumera Yamin on 16 Aug 2020
Hi, i slove a system of equations (Ax-b) using least square method. i get an output with x like [2.5; -11.1; 0.8; 0.5]. the status flag is zero with system converging at iteration 2 and relative residual of 0.019. I want to calculate the error on my fit i--e with which certainity my solution is accurate. Can i claim that the residual which is norm of (Ax-b)/b means that my fit has an error of 1.9%?if not how can i calculate error on my fit?

Answers (1)

Bruno Luong
Bruno Luong on 15 Aug 2020
Can i claim that the residual which is norm of (Ax-b)/b
No make it
norm(A*x-b) / norm(b)
Sumera Yamin
Sumera Yamin on 15 Aug 2020
Sorry i am not getting hang of it. " The fit has a relative l2-norm residual of 1.9%." how would i interpret this statement in terms of accuracy of my solution.
"The fit error usually designates the difference between the true and the estimated fit (parameters)" how can i calculate fit error?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by