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

How do I get the ROI coordinates based on my prediction?

I am using SVM to predict my ROI, I trained SVM and now in testing phases, it's giving me output with labels in the form of 1 and 0. I am trying that if SVM predicts 1 mean image contains eyebrow, now I want that it should be rectangle around the…
AHF
  • 1,070
  • 2
  • 15
  • 47
9
votes
0 answers

What is the training complexity of Sklearn GridSearch?

gs_clf = GridSearchCV(SVC(probability=False, class_weight='balanced', max_iter=100, random_state=2018, tol=1e-10), param_grid={'C': [2, 5, 10] , 'kernel': 'linear'}, n_jobs=1, …
Richie F.
  • 104
  • 1
  • 9
9
votes
1 answer

SciKit Learn SVR runs very long

I'm facing the following problem, I'm running a SVR from the scikit-learn library on a training set with about 46500 obsevations and it runs more than six hours, until now. I'm using the linear kernel. def build_linear(self): model =…
Tobias Schäfer
  • 1,330
  • 2
  • 17
  • 35
9
votes
2 answers

predict.svm does not predict new data

unfortunately I have problems using predict() in the following simple example: library(e1071) x <- c(1:10) y <- c(0,0,0,0,1,0,1,1,1,1) test <- c(11:15) mod <- svm(y ~ x, kernel = "linear", gamma = 1, cost = 2,…
Richard
  • 201
  • 1
  • 3
  • 5
9
votes
0 answers

Non-linear SVM is not available in Apache Spark

Does avyone know the reason why the Non-Linear SVM has not been implemented in Apache Spark? I was reading this page: https://issues.apache.org/jira/browse/SPARK-4638 Look at the last comment. It says: "Commenting here b/c of the recent dev list…
Vitrion
  • 405
  • 5
  • 14
9
votes
2 answers

Writing scikit-learn verbose log into an external file

I am trying to optimize an SVR model using GridSearchCV and facing a problem because of overfitting, to overcome this I have tried to decrease the number of iterations instead of leaving it until convergence.To compare the both models I need the…
Ahmad Sultan
  • 1,621
  • 2
  • 13
  • 19
9
votes
1 answer

Scikit-Learn SVR Prediction Always Gives the Same Value

I'm about to predict IMDB score (film rate) using Support Vector Regression in Scikit-Learn. The problem is it always gives the same prediction result for every input. When i predict using data training, it gives various result. But when using data…
9
votes
1 answer

Image classification using SVM Python

I am currently working on a projet to perform image recognition. There is a big set of images and I have to predict whether or not an image contains given characteristics. For example, the output could be whether or not there is a banana in the…
Matt
  • 93
  • 1
  • 2
  • 5
9
votes
2 answers

Why does support vectors in SVM have alpha (Lagrangian multiplier) greater than zero?

I understood the overall SVM algorithm consisting of Lagrangian Duality and all, but I am not able to understand why particularly the Lagrangian multiplier is greater than zero for support vectors. Thank you.
Neel Shah
  • 349
  • 1
  • 4
  • 12
9
votes
1 answer

How to use the 'svm_toy' Applet example in LibSVM?

I'm using LIBSVM. In the download package is a svm_toy.java file. I could not find out how it works. Here is the source code: import libsvm.*; import java.applet.*; import java.awt.*; import java.util.*; import java.awt.event.*; import…
Jürgen K.
  • 3,427
  • 9
  • 30
  • 66
9
votes
4 answers

How can the model be tuned to improve precision, when precision is much more important than recall?

The performance of a machine learning classifier can be measured by a variety of metrics like precision, recall, and classification accuracy, among other metrics. Given code like this: clf = svm.SVC(kernel='rbf') clf.fit(X_train, y_train) What…
steve
  • 583
  • 1
  • 5
  • 11
9
votes
2 answers

How to train a Support Vector Machine(svm) classifier with openCV with facial features?

I want to use the svm classifier for facial expression detection. I know opencv has a svm api, but I have no clue what should be the input to train the classifier. I have read many papers till now, all of them says after facial feature detection…
MMH
  • 1,676
  • 5
  • 26
  • 43
9
votes
2 answers

Why does load(...) return character name of object instead of the object itself?

The svm model is created with the package e1071 in R. To use the model, I need to save it and read as needed. The package has write.svm, but does not have read.svm. If I use model <- svm(x, y) save(model, 'modelfile.rdata') M <-…
Marina
  • 333
  • 1
  • 3
  • 9
9
votes
3 answers

Extract decision boundary with scikit-learn linear SVM

I have a very simple 1D classification problem: a list of values [0, 0.5, 2] and their associated classes [0, 1, 2]. I would like to get the classification boundaries between those classes. Adapting the iris example (for visualization purposes),…
user3057865
  • 313
  • 1
  • 3
  • 9
9
votes
1 answer

Different accuracies across different svm libraries with same parameters on same data

I am using libsvm and I did a very simple experiment, training 10k vectors and testing with only 22. I am using the linear kernel with parameter cost C=1. My problem is multiclass. So Libsvm will use the one-versus-one approach to classify my…
mad
  • 2,677
  • 8
  • 35
  • 78