7 #include <shark/Models/NearestNeighborClassifier.h> 11 using namespace shark;
26 NearestNeighborClassifier<RealVector> model(&algorithm, k);
31 double error_rate = loss(testdata.
labels(), prediction);
33 std::cout <<
"model: " << model.
name() << std::endl
34 <<
"test error rate: " << error_rate << std::endl;