3 ms·
SVM prediction is pretty straight-forward, even if you're using a kernel/dual formulation: "Here are some training points from classes A and B, each with an im
by iskander 13y ago
SVM prediction is pretty straight-forward, even if you're using a kernel/dual formulation:
"Here are some training points from classes A and B, each with an importance weight. Compute the weighted average of your new point's similarity to all the training exemplars. If the total comes out positive then it's from class A, otherwise it's from class B."
If you tried to explain training from a quadratic programming perspective it would get messy, but if you use stochastic gradient descent then even the training algorithm (for primal linear SVM) is pretty light on math.
Of course, this is only possible after a decade or two of researchers have played with an digested the ideas for you. I think until Léon Bottou's SGD SVM paper, even cursory explanations of SVMs seemed to get derailed into convex duality, quadratic programming solvers, and reproducing kernel hilbert spaces.
- misiti3780 13y agoI'm not sure I agree:i I'll say it differently: As far as I know, k-means (as the author described it) has two parameters: initial number of clusters K and max iterations (although I could be wrong), SVMS have: UPDATE: here is a gist: https://gist.github.com/josephmisiti/7572696 https://gist.github.com/josephmisiti/7572696 taken from here : http://www.csie.ntu.edu.tw/~cjlin/libsvm/ http://www.csie.ntu.edu.tw/~cjlin/libsvm/ I do not think that picking up LibSVM, compiling it, and running it is straight forward for everyone ...
- iskander 13y agoI think there's a big difference between explaining the essence of an algorithm and understanding all the details and decisions that go into a particular implementation. If explaining SVM, I'd stick with the linear primal formulation, which only really requires choosing the slack parameter C. If I needed to perform or explain non-linear prediction, I'd switch to the RBF kernel, which gives you one additional parameter (the RBF variance). Implementations of K-means, by the way, can also potentially have lots of parameters. Check out: http://scikit-learn.org/stable/modules/generated/sklearn.cluster.MiniBatchKMeans.html#sklearn.cluster.MiniBatchKMeans http://scikit-learn.org/stable/modules/generated/sklearn.clu...
- misiti3780 13y agofair enough - btw i just realized i bookmarked your blog (http://blog.explainmydata.com http://blog.explainmydata.com) a few weeks back - i was really enjoying those posts. nice work
- iskander 13y agoThanks :-) I'm going to finish grad school soon and the job I'm going to will be pretty rich with data analysis, hopefully will lead to more blog posts.