data format for using ML
I have been evaluating the machine learning methods in openCV. So far I got 4 (mlp, knn, svm and bayes) working. Interestingly, svm and bayes require the training lable matrix to be in format of CV_32SC1, mlp and knn need the training labe matrix in the format of CV_32FC1. Otherwise train() would crash.
It would be great if anyone can post the data formats for other methods decision tree, etc.
Thanks
Which opencv version ?
Latest release 3.2.0. I am exercising these methods and plan to post my sample code later. If you are interested, I can send you my current version. The code is based on the sample from bytefish.
If my memory is good I haven't got this problem
With the sample code from LBerger, I think I have a much better understanding on how to setup the parameters in using ML methods. Also I came up with a very nice package to demonstrate the results for different test data generated for verifying the classification capability of several methods.
Again many thanks go to LBerger.
LBerger, do you have working code for EM algorithm? If so please post it here. Thanks.
BTW, I'd like to post the code I tested but dont know where to publish them.
still working EM::predict method seems not compatible with other predict method. I made an issue..
I have update my code on gihub
Thanks, just ran your update, EM does not crash but gave me meaningless results. I used EM algorithm for medical image segmentation long time ago. May need take a detailed look to see how openCV implements the algorithm later. Busy today and will catch up with you later.