Live data from Hacker News

A Quick Look at Support Vector Machines

generalabstractnonsense.com

31–39 of 39 posts

Re: A Quick Look at Support Vector Machines

#31

One thing that I discovered recently which surprised me (while taking the Udacity SDC)is how effective and resilient these "older" ML algorithms can be. Neural networks was always my go to method for most of my classification or regression problems for my small side projects. But now I learned with the minimal dataset I have (<5K samples), linear regression, SVM, or decision tress is the way to go. I got higher accur…

If you start adding dimensions then neural networks perform better.

Re: A Quick Look at Support Vector Machines

#32
post #19
post #17

Earlier quoted context omitted.

> automatic feature extraction Hope you have a *ton of data, otherwise it's not gonna happen

And a lot of tweaking of configuration parameters until it's "automatic".

This was true maybe 10 years ago. Not so much anymore.

Re: A Quick Look at Support Vector Machines

#33
post #17
post #8

Earlier quoted context omitted.

Yes SVMs are still great models. The advantage neural nets have over them are that they can do automatic feature extraction. By the time you get to the last layer of a neural net, you are basically just doing a simple logistic classification, but the features coming in have been learned from all of the previous layers. I've even seen people use pretrained ImageNet classifiers, chop off the last layer and use an SVM a…

> automatic feature extraction Hope you have a *ton of data, otherwise it's not gonna happen

No, it will still happen. The learned features will just be "overfit" to that small dataset.

Re: A Quick Look at Support Vector Machines

#34

Earlier quoted context omitted.

Rosenblatt's perceptron has little to do with neural nets. Geoffrey Hinton regrets coining the name "multi-layer perceptron" precisely because they're really unrelated.

Hm, yeah I suppose you could argue it's not really a neural network unless you involve the idea of hidden layers. And according to wikipedia backpropagation wasn't a thing until 1975 so you might have a point.

"It's not really a neural network" is an understatement. Perceptrons are about as related to neural nets as linear regression is (note that you can "train" linear regression with stochastic gradient descent).

Re: A Quick Look at Support Vector Machines

#35
post #9

Aaah, I was hoping for an explanation of the kernel trick. I think that is the hardest concept in support vector machines.

Here's a simple analogy:

You want to class data in a 2D plane by drawing a straight line and saying everything on one side is in one class. But there's not likely to be a line that does this in general.

So you assign a z coordinate to all your points (even randomly). And it's now much more likely that at plane divides them the way you want than a line did before, as there are many ways to slip a plane in between the groups that wouldn't have been possible with a single line in the 2D plane.

Swapping the inner product for another inner-product-y kernel is similar, but with many / infinite dimensions coming into the picture.

Re: A Quick Look at Support Vector Machines

#36
post #8

One thing that I discovered recently which surprised me (while taking the Udacity SDC)is how effective and resilient these "older" ML algorithms can be. Neural networks was always my go to method for most of my classification or regression problems for my small side projects. But now I learned with the minimal dataset I have (<5K samples), linear regression, SVM, or decision tress is the way to go. I got higher accur…

Yes SVMs are still great models. The advantage neural nets have over them are that they can do automatic feature extraction. By the time you get to the last layer of a neural net, you are basically just doing a simple logistic classification, but the features coming in have been learned from all of the previous layers. I've even seen people use pretrained ImageNet classifiers, chop off the last layer and use an SVM a…

> they can do automatic feature extraction

Sort of. They can readily do really basic feature engineering along the lines of doing nonlinear transformations of the input. With a bit more doing, they can do spatial feature engineering (e.g., convolutional nets), and with a bit more foresight and planning they can learn the kinds of complex "hidden Markov process" style features you typically use in natural language processing.

But, as far as I'm aware, anyway, they can't necessarily do a great job with things like irregular time series (which is a huge chunk of big data), so you're still stuck doing some of that basic feature engineering. And I hesitate to say that some of the fancier architectures like LSTMs can be characterized as a turnkey solution for feature engineering, considering how much thought and effort and pre-existing knowledge and theory about what the engineered features should look like in the first place needed to go into designing them. So I feel like the "they can learn their own features" thing is a bit overhyped.

Re: A Quick Look at Support Vector Machines

#37

One thing that I discovered recently which surprised me (while taking the Udacity SDC)is how effective and resilient these "older" ML algorithms can be. Neural networks was always my go to method for most of my classification or regression problems for my small side projects. But now I learned with the minimal dataset I have (<5K samples), linear regression, SVM, or decision tress is the way to go. I got higher accur…

>But now I learned with the minimal dataset I have (Decision Trees are prone to overfitting and especially susceptible for small datasets. Random Forest is a good substitute that's become standard practice.

Re: A Quick Look at Support Vector Machines

#38
post #21

Earlier quoted context omitted.

I'm curious where the idea that SVM are "older" than neural networks comes from. The SVM wikipedia page claims that they were published by Vapnik & Chervonenkis in 1963, while Neural Networks date back at least to Rosenblatt's work in 1958, if not before.

I think that SVM's were seen in the late 1990s as replacements for three layer networks. This was because the kernel trick allowed the creation of high dimensional decision surfaces over large (for those days) training sets by optimisation. Because of the restrictions of computing power and data collection in those days the idea of very large neural networks was under explored, and most people believed that a very br…

Here's Vapnik's story, I first forgot where it was from, then I remembered:

https://ocw.mit.edu/courses/electrical-engineering-and-compu...

quote:

Now, the history lesson, all this stuff feels fairly new.

It feels like it's younger than you are.

Here's the history of it.

Vapnik immigrated from the Soviet Union to the United States in about 1991.

Nobody ever heard of this stuff before he immigrated.

He actually had done this work on the basic support vector idea in his Ph.D. thesis at Moscow University in the early '60s.

But it wasn't possible for him to do anything with it, because they didn't have any computers they could try anything out with.

So he spent the next 25 years at some oncology institute in the Soviet Union doing applications.

Somebody from Bell Labs discovers him, invites him over to the United States where, subsequently, he decides to immigrate.

In 1992, or thereabouts, Vapnik submits three papers to NIPS, the Neural Information Processing Systems journal.

All of them were rejected.

He's still sore about it, but it's motivating.

So around 1992, 1993, Bell Labs was interested in hand-written character recognition and in neural nets.

Vapnik thinks that neural nets-- what would be a good word to use?

I can think of the vernacular, but he thinks that they're not very good.

So he bets a colleague a good dinner that support vector machines will eventually do better at handwriting recognition then neural nets.

And it's a dinner bet, right?

It's not that big of deal.

But as Napoleon said, it's amazing what a soldier will do for a bit of ribbon.

So that makes colleague, who's working on this problem with handwritten recognition, decides to try a support vector machine with a kernel, in which n equals 2, just slightly nonlinear, works like a charm.

Was this the first time anybody tried a kernel?

Vapnik actually had the idea in his thesis but never though it was very important.

As soon as it was shown to work in the early '90s on the problem handwriting recognition, Vapnik resuscitated the idea of the kernel, began to develop it, and became an essential part of the whole approach of using support vector machines.

So the main point about this is that it was 30 years in between the concept and anybody ever hearing about it.

It was 30 years between Vapnik's understanding of kernels and his appreciation of their importance.

And that's the way things often go, great ideas followed by long periods of nothing happening, followed by an epiphanous moment when the original idea seemed to have great power with just a little bit of a twist.

And then, the world never looks back.

And Vapnik, who nobody ever heard of until the early '90s, becomes famous for something that everybody knows about today who does machine learning.

Re: A Quick Look at Support Vector Machines

#39
post #8

Earlier quoted context omitted.

Yes SVMs are still great models. The advantage neural nets have over them are that they can do automatic feature extraction. By the time you get to the last layer of a neural net, you are basically just doing a simple logistic classification, but the features coming in have been learned from all of the previous layers. I've even seen people use pretrained ImageNet classifiers, chop off the last layer and use an SVM a…

> they can do automatic feature extraction Sort of. They can readily do really basic feature engineering along the lines of doing nonlinear transformations of the input. With a bit more doing, they can do spatial feature engineering (e.g., convolutional nets), and with a bit more foresight and planning they can learn the kinds of complex "hidden Markov process" style features you typically use in natural language pro…

I've had great success with LSTMs for time series classification.
Post reply on HN