Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save joyhuang9473/073c860c60c72c235b24 to your computer and use it in GitHub Desktop.
Save joyhuang9473/073c860c60c72c235b24 to your computer and use it in GitHub Desktop.
Automatically choose optimal C and sigma based on a cross-validation set.
% Octave console output
% C list: [0.01 0.03 0.1 0.3 1 3 10 30]
% sigma list: [0.01 0.03 0.1 0.3 1 3 10 30]
Training ......... Done!
C: 0.010000
sigma: 0.010000
error = 0.56500
====================
Training ........................................ Done!
C: 0.010000
sigma: 0.030000
error = 0.060000
====================
Training ......................................................................
.. Done!
C: 0.010000
sigma: 0.100000
error = 0.045000
====================
(...)
Training ......................................................................
.............................. Done!
C: 30.000000
sigma: 3.000000
error = 0.065000
====================
Training ....................................................... Done!
C: 30.000000
sigma: 10.000000
error = 0.10000
====================
Training .................................................. Done!
C: 30.000000
sigma: 30.000000
error = 0.18000
====================
optimal C = 1.000000 and sigma = 0.100000
Program paused. Press enter to continue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment