3 ms·
Implementing the SVM from scratch was time consuming - no?
by misiti3780 14y ago
Implementing the SVM from scratch was time consuming - no?
- iskander 14y agoThe only tricky part would be writing a quadratic solver. Alternatives: either solve a linear SVM using gradient descent (simpler to write), or offload the core of the algorithm to an existing solver like cvxopt. edit: For an example of using cvxopt, check out http://www.mblondel.org/journal/2010/09/19/support-vector-machines-in-python/ http://www.mblondel.org/journal/2010/09/19/support-vector-ma...
- droz 14y agoAnother approach is to implement Platt's SMO: http://en.wikipedia.org/wiki/Sequential_minimal_optimization http://en.wikipedia.org/wiki/Sequential_minimal_optimization
- misiti3780 14y agocool - thanks
- c0g 14y agoYes it was :) but time well spent imo. On reflection I guess I might have had more free time to spend on this than a normal person - I did the SVM as a [small] part of my masters project, so if you're time constrained with a real job and a life then might be best to disregard me.
- misiti3780 14y agoIf you had the quadratic solver, I would think it would be reasonable to add the rest of the code. If you started adding costs, gammas, etc. I would think it would take a while. I spent hours looking at the source code of libSVM at my last job and never really understood what the hell was going on