Questions tagged [svm]

Support vector machines (SVMs) are a set of related supervised learning methods that analyze data and recognize patterns, used for classification and regression analysis.

From Wikipedia:

Support vector machines (SVMs) are a set of related supervised learning methods that analyze data and recognize patterns, used for classification and regression analysis. The standard SVM takes a set of input data and predicts, for each given input, which of two possible classes the input is a member of, which makes the SVM a non-probabilistic binary linear classifier. Since an SVM is a classifier, then given a set of training examples, each marked as belonging to one of two categories, an SVM training algorithm builds a model that assigns new examples into one category or the other. Intuitively, an SVM model is a representation of the examples as points in space, mapped so that the examples of the separate categories are divided by a clear gap that is as wide as possible. New examples are then mapped into that same space and predicted to belong to a category based on which side of the gap they fall on.

4561 questions
21
votes
6 answers

Know any good c++ support vector machine (SVM) libraries?

Do you know of any good c++ svm libraries out there I tried libsvm http://www.csie.ntu.edu.tw/~cjlin/libsvm/ but so far I'm not flabbergasted. I have also heard of SVMLight and TinySVM. Have you tried them ? Any new players ? Thanks !
levesque
  • 8,756
  • 10
  • 36
  • 44
20
votes
1 answer

In sklearn what is the difference between a SVM model with linear kernel and a SGD classifier with loss=hinge

I see that in scikit-learn I can build an SVM classifier with linear kernel in at last 3 different ways: LinearSVC SVC with kernel='linear' parameter Stochastic Gradient Descent with loss='hinge' parameter Now, I see that the difference between…
JackNova
  • 3,911
  • 5
  • 31
  • 49
20
votes
4 answers

import check_arrays from sklearn

I'm trying to use a svm function from the scikit learn package for python but I get the error message: from sklearn.utils.validation import check_arrays ImportError: cannot import name 'check_arrays' I'm using python 3.4. Can anyone give me an…
rado
  • 401
  • 3
  • 8
  • 16
20
votes
5 answers

Where is it best to use svm with linear kernel?

I am currently studing svm and was wondering what the application of svm`s with linear kernel is. In my opinion it must be something applied to solving a linear optimization problem. Is this correct? I appreciate your answer!
Carol.Kar
  • 4,581
  • 36
  • 131
  • 264
20
votes
4 answers

Support Vector Machine for Java?

I'd like to write a "smart monitor" in Java that sends out an alert any time it detects oncoming performance issues. My Java app is writing data in a structured format to a log file: | | So, for…
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
19
votes
3 answers

Convert sklearn.svm SVC classifier to Keras implementation

I'm trying to convert some old code from using sklearn to Keras implementation. Since it is crucial to maintain the same way of operation, I want to understand if I'm doing it correctly. I've converted most of the code already, however I'm having…
none32
  • 515
  • 1
  • 5
  • 21
19
votes
2 answers

Building an SVM with Tensorflow

I currently have two numpy arrays: X - (157, 128) - 157 sets of 128 features Y - (157) - classifications of the feature sets This is the code I have written to attempt to build a linear classification model of these features. First of all I…
maxisme
  • 3,974
  • 9
  • 47
  • 97
19
votes
3 answers

Compute the gradient of the SVM loss function

I am trying to implement the SVM loss function and its gradient. I found some example projects that implement these two, but I could not figure out how they can use the loss function when computing the gradient. Here is the formula of loss…
Merve Bozo
  • 439
  • 1
  • 6
  • 12
19
votes
1 answer

Right function for normalizing input of sklearn SVM

I found several questions related to this, but no one solved my doubts. In particular, the two answers to this question confused me even more. I'm training a linear SVM on top of a set of features - Convolutional Neural Net features resulting from…
Iena Plissken
  • 191
  • 1
  • 1
  • 4
18
votes
2 answers

Retraining after Cross Validation with libsvm

I know that Cross validation is used for selecting good parameters. After finding them, i need to re-train the whole data without the -v option. But the problem i face is that after i train with -v option, i get the cross-validation accuracy( e.g…
lakshmen
  • 28,346
  • 66
  • 178
  • 276
18
votes
1 answer

SVM equations from e1071 R package?

I am interested in test the SVM performance to classify several individuals into four groups/classes. When using the svmtrain LibSVM function from MATLAB, I am able to get the three equations used to classify those individuals among the 4 groups,…
Manuel Ramón
  • 2,490
  • 2
  • 18
  • 23
18
votes
3 answers

What is the theorical foundation for scikit-learn dummy classifier?

By the documentation I read that a dummy classifier can be used to test it against a classification algorithm. This classifier is useful as a simple baseline to compare with other (real) classifiers. Do not use it for real problems. What does…
john doe
  • 2,233
  • 7
  • 37
  • 58
18
votes
2 answers

How to use a custom SVM kernel?

I'd like to implement my own Gaussian kernel in Python, just for exercise. I'm using: sklearn.svm.SVC(kernel=my_kernel) but I really don't understand what is going on. I expect the function my_kernel to be called with the columns of the X matrix as…
Luigi Tiburzi
  • 4,265
  • 7
  • 32
  • 43
18
votes
1 answer

Functionality of probability=TRUE in svm function of e1071 package in R

In R, what is the functionality of probability=TRUE in the svm function of the e1071 package? model <- svm (Type ~ ., data, probability=TRUE, cost = 100, gamma = 1)
A.M.
  • 1,757
  • 5
  • 22
  • 41
18
votes
5 answers

How to approach machine learning problems with high dimensional input space?

How should I approach a situtation when I try to apply some ML algorithm (classification, to be more specific, SVM in particular) over some high dimensional input, and the results I get are not quite satisfactory? 1, 2 or 3 dimensional data can be…
sold
  • 393
  • 1
  • 3
  • 6