45 using namespace shark;
55 void draw(RealVector& input,
unsigned int& label)
const 67 unsigned int classes = 5;
68 std::size_t ell = 100;
69 std::size_t tests = 10000;
83 unsigned int pairs = classes * (classes - 1) / 2;
84 std::vector< KernelClassifier<RealVector> > bin_svm(pairs);
85 for (std::size_t n=0, c=1; c<classes; c++)
87 std::vector< OneVersusOneClassifier<RealVector>::binary_classifier_type* > vs_c;
88 for (std::size_t e=0; e<c; e++, n++)
95 trainer.
train(bin_svm[n], bindata);
96 vs_c.push_back(&bin_svm[n]);
104 double train_error = loss.
eval(training.
labels(), output);
105 output = ovo(test.
inputs());
106 double test_error = loss.
eval(test.
labels(), output);
107 cout <<
"training error: " << 100.0 * train_error <<
"%" << endl;
108 cout <<
" test error: " << 100.0 * test_error <<
"%" << endl;