Hacker News new | ask | show | jobs
by c0g 4795 days ago
Speaking as a PhD student in machine learning-

Implement the algorithm yourself, first, in Python+Numpy. The only reason I feel comfortable with Gaussian Processes and SVMs is due to writing code to solve them manually.

Once you're happy with the basics, and can test your ideas with code you intimately understand, optimise for speed by using a library like this.

2 comments

Implementing the SVM from scratch was time consuming - no?
The 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-ma...

Another approach is to implement Platt's SMO:

http://en.wikipedia.org/wiki/Sequential_minimal_optimization

cool - thanks
Yes 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.

If 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
I do agree with you regardless, just curious