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
1
vote
0 answers

Value error when trying to do classification with support vector machines

I am trying to use different techniques to classify my data. I cleaned my dataset and then I also standardized and rescaled my input components to look for any differences. When i am trying to perform the following Support Vector Machines, i get the…
1
vote
1 answer

CNN model have better accuracy than combined CNN-SVM model

I was trying to compare the accuracy results of CNN model and combined CNN-SVM model for classification. However I found that CNN model have better accuracy than combined CNN-SVM model. Is That correct or it can happen?
root
  • 59
  • 1
  • 7
1
vote
2 answers

SVM and Random Forest with recall = 0

I am trying to predict one from two values which can appear in column 'exit'. I have clean data (about 20 columns and 4k rows contain typical information about customers like 'sex', 'age' ...). In training dataset about 20% customers were qualified…
user11979210
1
vote
0 answers

Why do I get a bad accuracy when using color histograms for training an SVM?

I want to extract color histograms from the GTSRB dataset to train with them an SVM. Unfortunately, I get an accuracy of only 0.18. I'm using OpenCV version 3.4.2. def make_color_histo(X): histo_list = [] for i in range(0, len(X)): …
Code Now
  • 711
  • 2
  • 9
  • 20
1
vote
1 answer

Scaled data with SVM causing strange Confusion Matrix

I have a dataset with X.shape (104481, 34) and y.shape (104481,), and I want to train an SVM model on it. The steps I do are (1) Split data, (2) Scale data, and (3) Train SVM: (1) Split data: Function: from sklearn.model_selection import…
meerkat
  • 932
  • 2
  • 14
  • 38
1
vote
0 answers

How to simulate data in R for a polynomial SVM

I'm new to simulating data in R and would like to know how to generate a polynomial separator of degree 2 in R. This is the question: Generate a Data Set by Simulations: We seek to generate 5000 cases x^1 ... x^5000 in R^4 each case x = [ x1 x2 x3…
vdu12345
  • 73
  • 1
  • 8
1
vote
0 answers

Sklearn SVM with non-numpy objects and custom kernel

I want to do SVM classification (i.e. OneClassSVM) with sklearn.svm.OneClassSVM on physical states that come from a different library (tenpy). I'd define a custom kernel def overlap(X,Y): return np.array([[x.overlap(y) for y in Y] for x in…
Korbinian
  • 43
  • 4
1
vote
2 answers

Why does a single column cause my SVM to take an hour?

I am using sklearn.SVC on a pandas DataFrame to predict categorical data. The feature vector named "feature_train" is a single time column (numpy.int64) and a few thousand tfidf columns (which very sparely contain numpy.float64 values): …
Peter Robe
  • 11
  • 2
1
vote
2 answers

OneClassSVM for binary classification

I am using OneClassSVM for a binary classification problem. I have a dataset where the target variable is labeled 0 or 1. I don't know if OneClassSVM can be used for binary or multi classification problems, but when I try to predict I get the…
Perl Del Rey
  • 959
  • 1
  • 11
  • 25
1
vote
0 answers

Is it necessary for a kernel function to have a corresponding feature map?

I have read about linear kernels, polynomial kernels, etc. Then I wondered whether if it's needed to for a kernel function to have a feature map.
CrimeDog
  • 43
  • 1
  • 3
1
vote
1 answer

Apache Flink - Tweet Vectorization for SVM

i am currently working on a hate speech filter using Apache Flink's FlinkML programmed in Scala. I have a huge .csv training dataset containing rows like: id,count,hate_speech,offensive_language,neither,class,tweet 326,3,0,1,2,2,"""@complex_uk:…
IboJaan
  • 63
  • 7
1
vote
1 answer

Which algorithm does R use for computing one-class SVM ? (package e1071)

Which algorithm does R use for computing one-class SVM ? This is the function e1071::svm(..., type=one-classification, ...) I have found this very nice blog, where author writes about two algorithms for one-class SVM. Which one does the function…
pikachu
  • 690
  • 1
  • 6
  • 17
1
vote
0 answers

How to use SVM for unserpvised clustering scikit-learn

I would like to use SVM of scikit-learn library to do unserpervised clustering. I have been reading the documentation and many links in the net, but I can't find how to do that. Would you mind explaining me how to use scikit-learn for that and also…
southernKid33
  • 351
  • 1
  • 2
  • 14
1
vote
1 answer

What is the maximal number of iterations in the e1071 svm() function?

I know that there is a hard coded number of maximal iterations in the e1071 svm() function, but can someone tell me how high this number is?
Mirko
  • 89
  • 5
1
vote
0 answers

LIBSVM Accuracy Error: Accuracy comes Zero

I want to use LIBSVM for electrical load forecasting but my prepared data stucked. People says that labels must be any real number but my data electrical load. How can i convert data or handle this issue? My Libsvm format: Labels represent…
MERT
  • 11
  • 1
1 2 3
99
100