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
7
votes
4 answers

Which is a better method? libsvm or svmclassify?

I have been recently trying to use svm for feature classification. While i was doing so, a question came to my mind. Which would be a better method to use, LIBSVM or svmclassify? What I mean by svmclassify is to use in-built functions in MATLAB such…
user999450
  • 249
  • 5
  • 14
7
votes
1 answer

Tutorial for libsvm c++

Looking for tutorials and/or sample code for libSVM's C++ interface. Specifically, I want to classify features extracted by using SIFT or SURF feature descriptors. I have tried looking on the website and did not find any such documentation/sample…
Mario
  • 1,469
  • 7
  • 29
  • 46
7
votes
1 answer

SVC vs LinearSVC in scikit learn: difference of loss function

According to this post, SVC and LinearSVC in scikit learn are very different. But when reading the official scikit learn documentation, it is not that clear. Especially for the loss functions, it seems that there is an equivalence: And this post…
John Smith
  • 1,604
  • 4
  • 18
  • 45
7
votes
2 answers

Classification score: SVM

I am using libsvm for multi-class classification. How can I attach classification scores, to compare the confidence of classification, with the output for a given sample as: Class 1: score1 Class 2: score2 Class 3: score3 Class 4: score4
Xolve
  • 22,298
  • 21
  • 77
  • 125
7
votes
4 answers

svm for binary data with hamming distance

I have a standard {-1,+1} machine learning problem. The main difference is that the data points are binary strings, so their prooximity is measured by Hamming distance. Can SVM be applied in this case? What SVM library is suited better for this…
Allllex
  • 71
  • 1
  • 2
7
votes
1 answer

MATLAB fitcSVM weight vector

I am training a linear SVM classifier with the fitcsvm function in MATLAB: cvFolds = crossvalind('Kfold', labels, nrFolds); for i = 1:nrFolds % iterate through each fold testIdx = (cvFolds == i); …
Pugl
  • 432
  • 2
  • 5
  • 22
7
votes
2 answers

Vectorized SVM gradient

I was going through the code for SVM loss and derivative, I did understand the loss but I cannot understand how the gradient is being computed in a vectorized manner def svm_loss_vectorized(W, X, y, reg): loss = 0.0 dW = np.zeros(W.shape) #…
Nikhil Verma
  • 1,777
  • 1
  • 20
  • 41
7
votes
1 answer

Flink SVM 90% misclassification

I try to do some binary classification with the flink-ml svm implementation. When I evaluated the classification I got a ~85% error rate on the training dataset. I plotted the 3D data and it looked like you could separate the data quite well with a…
hucko
  • 81
  • 5
7
votes
1 answer

Plot hyperplane Linear SVM python

I am trying to plot the hyperplane for the model I trained with LinearSVC and sklearn. Note that I am working with natural languages; before fitting the model I extracted features with CountVectorizer and TfidfTransformer. Here the classifier: from…
Alex
  • 1,447
  • 7
  • 23
  • 48
7
votes
1 answer

What does the Kernel Scale parameter inLinear and polynomial kernel in SVM?

I have a theoretical question, and understand the concept of Kernel scale with the Gaussian Kernel, but when I run 'OptimizeHyperparameters' in fitcsvm in Matlab, it gives me different values than one, and I would like to understand what that…
Guilherme
  • 135
  • 1
  • 1
  • 6
7
votes
1 answer

Verbose log abbriviations meaning in SVC, scikit-learn

I am looking for the meaning of verbose log abbriviations of SVC function in scikit-learn? If nSV is the number of support vectors, #iter is the number of iteration, what dose nBSV, rho,obj mean? This is an example: import numpy as np from…
Ahmad Sultan
  • 1,621
  • 2
  • 13
  • 19
7
votes
1 answer

scikit-learn SVM with a lot of samples / mini batch possible?

According to http://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html I read: "The fit time complexity is more than quadratic with the number of samples which makes it hard to scale to dataset with more than a couple of 10000…
domi771
  • 450
  • 1
  • 9
  • 21
7
votes
2 answers

Active Learning (e.g. Pool Sampling) for SVM in python

I'm working on a problem that would greatly benefit from an active learning protocol (e.g. given a set of unlabeled data as compared to an existing model, the algorithm requests that a subset of unlabeled data be labeled by an 'oracle'). Does…
DrTchocky
  • 515
  • 1
  • 5
  • 14
7
votes
3 answers

sklearn SVM fit() "ValueError: setting an array element with a sequence"

I am using sklearn to apply svm on my own set of images. The images are put in a data frame. I pass to the fit function a numpy array that has 2D lists, these 2D lists represents images and the second input I pass to the function is the list of…
7
votes
2 answers

Major assumptions of machine learning classifiers (LG, SVM, and decision trees)

In classical statistics, people usually state what assumptions are assumed (i.e. normality and linearity of data, independence of data). But when I am reading machine learning textbooks and tutorials, the underlying assumptions are not always…
KubiK888
  • 4,377
  • 14
  • 61
  • 115