22 void draw(
VectorType& input,
unsigned int& label)
const 25 input.resize(1000002);
33 int main(
int argc,
char** argv)
37 std::cout <<
"required parameters: ell C epsilon" << std::endl;
42 unsigned int ell = std::atoi(argv[1]);
43 double C = std::atof(argv[2]);
44 double epsilon = std::atof(argv[3]);
45 unsigned int tests = 10000;
46 std::cout <<
"ell=" << ell << std::endl;
47 std::cout <<
"C=" << C << std::endl;
48 std::cout <<
"epsilon=" << epsilon << std::endl;
59 std::cout <<
"machine training ..." << std::endl;
62 trainer.
train(svm, training);
63 std::cout <<
"done." << std::endl;
69 double train_error = loss.
eval(training.
labels(), output);
70 output = svm(test.
inputs());
71 double test_error = loss.
eval(test.
labels(), output);
72 std::cout <<
"training error= "<< train_error <<
" test error= "<< test_error<<std::endl;