17 void draw(RealVector& input,
unsigned int& label)
const 29 int main(
int argc,
char** argv)
32 unsigned int ell = 500;
33 unsigned int tests = 10000;
37 size_t budgetSize = 16;
54 kernelBudgetedSGDtrainer.setEpochs(epochs);
57 std::cout <<
"Training the " << kernelBudgetedSGDtrainer.
name() <<
" on the problem with a budget of " << budgetSize <<
" and " << epochs <<
" Epochs..." << std::endl;
58 kernelBudgetedSGDtrainer.train(kernelClassifier, trainingData);
61 std::cout <<
"We have " << nSupportVectors <<
" support vectors in our model.\n";
66 double train_error = loss.
eval(trainingData.
labels(), output);
67 cout <<
"training error:\t" << train_error << endl;
68 output = kernelClassifier(testData.
inputs());
69 double test_error = loss.
eval(testData.
labels(), output);
70 cout <<
"test error:\t" << test_error << endl;