Ask Your Question
0

Is there svm.trainAuto() module for python?

asked 2017-05-29 04:21:12 -0500

I was trying to implement one class classifier in svm but was a bit confused about the paramters.Is there svm.trainAuto() module for opencv in python. The documentation does not refer to it.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-05-30 06:56:26 -0500

berak gravatar image

no, trainAuto() is not available in the python wrappers.

simulating it from python would be:

 (split data into train & test set, then)
 for C in [0.1, 1, 10, 100, 1000]:
      for gamma in [0.1, 0.5, 0.7, 1, 1.5, 2, 5, 10]:
            svm.setC(C)
            svm.setGamma(gamma)
            svm.train()
            svm.test()
            measure accuracy, and keep best param set
edit flag offensive delete link more

Comments

This worked. Thanks!

Aditya3996 gravatar imageAditya3996 ( 2017-06-01 05:36:47 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-05-29 04:21:12 -0500

Seen: 692 times

Last updated: May 30 '17