Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you can save your train input as csv, like:

1, 0.2324
0, 0.1487
^    ^

label EAR value

and later use loadFromCSV() to feed your SVM:

Ptr<svm> svm = SVM::create(); Ptr<traindata> tdata = TrainData::loadFromCSV("my.csv",0,0,1); svm->train(tdata);

you can save your train input as csv, like:

 1, 0.2324
 0, 0.1487
 ^    ^

label EAR value

value

and later use loadFromCSV() to feed your SVM:

Ptr<svm>

Ptr<SVM> svm = SVM::create();
Ptr<traindata> Ptr<TrainData> tdata = TrainData::loadFromCSV("my.csv",0,0,1);
svm->train(tdata);

svm->train(tdata);