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
8
votes
1 answer

Gradient of a Loss Function for an SVM

I'm working on this class on convolutional neural networks. I've been trying to implement the gradient of a loss function for an svm and (I have a copy of the solution) I'm having trouble understanding why the solution is correct. On this page it…
David
  • 1,398
  • 1
  • 14
  • 20
8
votes
2 answers

how to use svm in Weka Classsifier?

I am trying to use SVM classifier in Weka. I downloaded weka-3-7-13 version. When i click on the classifier tab, SVM is not in the list. How to use SVM in this tool? Please help me to overcome this problem.
AnnRose
  • 81
  • 1
  • 1
  • 5
8
votes
1 answer

How does StackOverflow's tag suggestions work?

I've got a database of hundreds of thousands of forum posts, and would like to tag them in an unsupervised way. I noticed that StackOverflow's tag system suggests tags as I go. How does this algorithm work? I also found this that implies it is SVM…
cjm2671
  • 18,348
  • 31
  • 102
  • 161
8
votes
1 answer

Specifying k-fold cross validation using tune.svm() in R

I have two lists of parameters (gamma and cost) that I want to select using a SVM. I want to do 5-fold crossvalidation, but my code makes 10-fold cross validation (which is the default). My code is looking like this: prioir_svm <- tune.svm(train, y…
Mads Obi
  • 560
  • 3
  • 8
  • 17
8
votes
1 answer

Difference between .score() and .predict in the sklearn library?

I have instantiated a SVC object using the sklearn library with the following code: clf = svm.SVC(kernel='linear', C=1, cache_size=1000, max_iter = -1, verbose = True) I then fit data to it using: model = clf.fit(X_train, y_train) Where X_train is a…
precicely
  • 511
  • 6
  • 17
8
votes
4 answers

SVM Visualization in MATLAB

How do I visualize the SVM classification once I perform SVM training in Matlab? So far, I have only trained the SVM with: % Labels are -1 or 1 groundTruth = Ytrain; d = xtrain; model = svmtrain(groundTruth, d);
djpark121
  • 1,191
  • 3
  • 10
  • 5
8
votes
1 answer

scikit learn svc coef0 parameter range

Documentation here. I'm wondering how important the coef0 parameter is for SVCs under the polynomial and sigmoid kernels. As I understand it, it is the intercept term, just a constant as in linear regression to offset the function from zero.…
lollercoaster
  • 15,969
  • 35
  • 115
  • 173
8
votes
3 answers

What is the difference between a decision boundary and a hyperplane?

I am looking into support vector machines and I am wondering what the difference between the decision boundary and the optimal hyperplane is? They both seem to be described as the line drawn to separate the datapoints.
High schooler
  • 1,682
  • 3
  • 30
  • 46
8
votes
3 answers

Vastly different results for SVM model using e1071 and caret

I'm training two SVM models using two differnt packages on my data and getting vastly different results. Is this something to be expected? model1 using e1071 library('e1071') model1 <- svm(myFormula,…
user2175594
  • 799
  • 3
  • 9
  • 17
8
votes
2 answers

File format for classification using SVM light

I am trying to build a classifier using SVM light which classifies a document in one of the two classes. I have already trained and tested the classifier and a model file is saved to the disk. Now I want to use this model file to classify completely…
ritesh
  • 229
  • 1
  • 5
  • 12
8
votes
2 answers

How should I teach machine learning algorithm using data with big disproportion of classes? (SVM)

I am trying to teach my SVM algorithm using data of clicks and conversion by people who see the banners. The main problem is that the clicks is around 0.2% of all data so it's big disproportion in it. When I use simple SVM in testing phase it always…
8
votes
1 answer

Example for svm feature selection in R

I'm trying to apply feature selection (e.g. recursive feature selection) in SVM, using the R package. I've installed Weka which supports feature selection in LibSVM but I haven't found any example for the syntax of SVM or anything similar. A short…
Ofer Rahat
  • 790
  • 1
  • 9
  • 15
8
votes
1 answer

Time series prediction using support vector regression

I've been trying to implement time series prediction tool using support vector regression in python language. I use SVR module from scikit-learn for non-linear Support vector regression. But I have serious problem with prediction of future events.…
Tom Marek
  • 378
  • 3
  • 7
8
votes
2 answers

SVM Classification with Caret Error (Basic)

I am probably making a very simple (and stupid) mistake here but I cannot figure it out. I am playing with some data from Kaggle (Digit Recognizer) and trying to use SVM with the Caret package to do some classification. If I just plug the label…
mchangun
  • 9,814
  • 18
  • 71
  • 101
8
votes
1 answer

is logistic regression large margin classifier?

As I understand large margin effect in SVM: For example let's look at this image: In SVM optimization objective by regularization term we trying to find a set of parameters, where the norm of (parameters vector) theta is small. So we must find…