필터 지우기
필터 지우기

Curve fitting: What does LAR do?

조회 수: 7 (최근 30일)
able_archer
able_archer 2016년 12월 1일
댓글: able_archer 2016년 12월 1일
Hello, when conducting a nonlinear least squares regression, one can select 'LAR' (=least absolute residuals) under 'fitoptions'. This is a bit confusing because afaik LAR by definition does NOT minimize squared, but linear residuals. So if 'LAR' is selected, the regression is actually not based on nonlinear least squares, right?
Greetings Vince
  댓글 수: 1
Tamir Suliman
Tamir Suliman 2016년 12월 1일
I think this has been answered in
https://www.mathworks.com/matlabcentral/answers/81143-fit-and-polyfit-lar-vs-least-squares

댓글을 달려면 로그인하십시오.

채택된 답변

John D'Errico
John D'Errico 2016년 12월 1일
편집: John D'Errico 2016년 12월 1일
I don't understand what is confusing. The sum of the absolute values of the residuals is clearly NOT least squares, thus a minimum sum of squares of residuals. If it was, there would be no point in offering it as an alternative.
Least squares puts more importance on the large residuals. For example, suppose you have two cases, based on two sets of parameters. We need consider only two points.
Case 1: Resid1 = 1, Resid2 = 1
case 2: Resid1 = 0, Resid2 = 2
For a least squares solver, the two cases are very different. Case 1 would be preferred, since the sum of squares is 2, versus 4 for the latter. So whatever set of parameters generated case 1 will be chosen as better.
In a LAR scheme (also called MAD, for minimum absolute deviations) the sum of the absolute residuals are identical. Neither solution would be preferred over the other.
One reason one might use such a scheme is it will be less sensitive to outliers in the data, whereas least squares tends to be jerked around by outliers quite easily.
  댓글 수: 1
able_archer
able_archer 2016년 12월 1일
Thanks for your answer.
So LAR does indeed not use Least Squares. What confused me about it is that although you set 'Robust' to 'LAR', you still have 'NonlinearLeastSquares' as 'Method' (see below) which could make one think 'LAR' was a nonlinear least squares method though this is not the case.
Normalize: 'off'
Exclude: []
Weights: []
Method: 'NonlinearLeastSquares'
Robust: 'LAR'
StartPoint: [0.1200 0.8500 75 0]
Lower: [-Inf -Inf -Inf -Inf]
Upper: [Inf Inf Inf Inf]
Algorithm: 'Trust-Region'
DiffMinChange: 1.0000e-08
DiffMaxChange: 0.1000
Display: 'Notify'
MaxFunEvals: 10000
MaxIter: 10000
TolFun: 1.0000e-12
TolX: 1.0000e-12

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by