Use lambda=1 for regularizing the polynomial fit
This commit is contained in:
parent
717ea8c788
commit
3751214442
1 changed files with 1 additions and 1 deletions
|
@ -164,7 +164,7 @@ pause;
|
||||||
% lambda to see how the fit and learning curve change.
|
% lambda to see how the fit and learning curve change.
|
||||||
%
|
%
|
||||||
|
|
||||||
lambda = 0;
|
lambda = 1;
|
||||||
[theta] = trainLinearReg(X_poly, y, lambda);
|
[theta] = trainLinearReg(X_poly, y, lambda);
|
||||||
|
|
||||||
% Plot training data and fit
|
% Plot training data and fit
|
||||||
|
|
Reference in a new issue