Lets say i have following 1D data (position on x), color is target class and I need a classifier which classifies green from red: enter image description here

I decided to use SVM. Data is clearly not linearly separable, so i need to map it to higher dimensional space.

The question is should the transformation be applied to both green and red classes, or should i apply it just to one class? Look at the following image where i applied transformation only to red points. The problem is, when i apply it just to one class as on following image (and use gaussian radial basis function, then set the hyperplane), it is very similar to KNN, and it looks like that I misunderstood RBF concept. enter image description here But if i modified all the data that way, then it would be just shifted to y = 1 position and still would not be linearly separable. So what is the correct way of transformation to higher dimensional space?


1 Answer 1


You've just plotted RBF similarity measures for each point, not the transformations. RBF kernel maps the data into infinite dimensional space, so you won't be able to actually visualize it. Kernel defines a similarity matrix that you can build your SVM onto. SVM doesn't need the explicit mapping in its optimization procedure, i.e. in its Lagrangian formulation. This is known as kernel trick. Here is an example mapping for RBF kernel.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.