Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

the ml module in 3.0 got some refactoring lately.

you can no more create an instance 'on the stack' like KNearest knn;

instead, you will have to use :

 Ptr<ml::KNearest> knn = ml::KNearest::create();
 knn->train(...);
 knn->predict(...);

(btw, same for SVM, EM, etc.)