1 | initial version |
I am trying to create empty KNearest like berak, but I still have an error! What is the parametr of func KNearest::creat?
2 | No.2 Revision |
I am trying to create empty KNearest like berak, but I still have an error! What is the parametr of func KNearest::creat?
I've found solution like below, but it still doesn't compile
Ptr<KNearest> knearestKdt = KNearest::create(ml::KNearest::Params(10, true, INT_MAX, ml::KNearest::KDTREE));
knearestKdt->train(trainData, ml::ROW_SAMPLE, trainLabels);
knearestKdt->findNearest(testData, 4, bestLabels);