Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save joyhuang9473/4a642b25bd987c77a444 to your computer and use it in GitHub Desktop.
Save joyhuang9473/4a642b25bd987c77a444 to your computer and use it in GitHub Desktop.
Test various values of lambda and compute error
Iteration 200 | Cost: 1.812655e-01
Iteration 200 | Cost: 1.902681e-01
Iteration 200 | Cost: 2.527827e-01
Iteration 200 | Cost: 3.850725e-01
Iteration 200 | Cost: 6.692749e-01
Iteration 186 | Cost: 1.443470e+00
Iteration 111 | Cost: 3.101591e+00
Iteration 61 | Cost: 7.268148e+00
Iteration 33 | Cost: 1.586769e+01
Iteration 20 | Cost: 3.337220e+01
lambda Train Error Validation Error
0.000000 0.181265 22.664199
0.001000 0.158597 18.165177
0.003000 0.187127 19.029032
0.010000 0.221858 17.059909
0.030000 0.281862 12.829269
0.100000 0.459318 7.587014
0.300000 0.921760 4.636833
1.000000 2.076188 4.260625
3.000000 4.901351 3.822907
10.000000 16.092213 9.945509
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment