c++ - How to judge the predict result of which SVM in opencv? -
for example have 2 svm objects svma , svmb, train different data set, , have sample sampc.
int idx = svma.predict(sampc); int idx2 = svmb.predict(sampc);
how judge svm return similar result ? thanks.
this answered here, , in predict() doco (assuming have 2 class svm).
if call predict() again, , set parameter returndfval=true decision function value (the signed distance margin). can use judge result "better". bigger distance margin, more sample belongs class has been assigned.
Comments
Post a Comment