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

Interpretation of method plt.fill_between()? Discussion

A question for discussion: The matplotlib documentation says that the method plt.fill_between is used to "fill the area between two horizontal curves". What exactly is meant by "horizontal"? Intuitively, I would say "two parallel curves". Like in…
aurumpurum
  • 932
  • 3
  • 11
  • 27
1
vote
1 answer

How to Improve Classification Accuracy with Support Vector Machine

I have 7 classes of inputs that are related to the brain signals activity (EEG). When the number of classes is large, the performance of classification algorithms may be affected. As you can see in the following code, I extracted the features for…
1
vote
0 answers

SVM Scikit-learn - Data Augmentation possible?

are there any functions in Scikit-learn or another library which support Data Augmentation for SVMs? Anything like the ImageDataGenerator in Keras, just for SVMs? It is really an important question for me which I have been trying to answer for a…
1
vote
2 answers

How to determine the positive class in roc_auc_score?

I want to use roc_auc_score to evaluate the performance of the classifier, but I'm not sure what is the right parameters to give it. This is a description of this function in the documentation: documentation. As you can see, it needs y_score, which…
jiayeah
  • 29
  • 2
1
vote
0 answers

CNN-SVM Model - problem in testing accuracy

I tried to run a cnn model on my data and it gives me high accuracy. Then i tried to extract the features from the first dense layer and feed it into svm classifier, but unfortunately the validation accuracy is very high and the testing is 50%…
1
vote
1 answer

Machine Learning: Predict second dataset on behalf of first dataset trained classifier

i am new to "Machine Learning" and tried to implement this question but it is unclear to me. its been 2 months i am Seducing, so please help me to resolve my error. Actually, i am trying to: "Train svm classifer" on TRAIN_features and TRAIN_labels…
Chapter 9
  • 13
  • 3
1
vote
1 answer

how to use SVM to classify if the shape of features for each sample is matrix? Is it simply to reshape the matrix to long vector?

I have 120 samples and the shape of features for each sample is matrix of 15*17. how to use SVM to classify? Is it simply to reshape the matrix to long vector?
Mindy
  • 175
  • 1
  • 1
  • 8
1
vote
1 answer

Can svc.predict return the result along with probabilities for the other classes?

I am using SVM classifier for multi class classification. I want svc.predict to return the result along with probabilities for the other classes also. The result i got is like…
Akhil
  • 31
  • 6
1
vote
0 answers

Have a problem in coding SVM using tensorflow2 on Fraud detection dataset

I'm new in tensorflow. I wrote following code using tensorflow2 in google colab but when I run,I'm getting this error: OOM when allocating tensor with shape[130000,130000] and type double on /job:localhost/replica:0/task:0/device:GPU:0 by…
1
vote
1 answer

svmlib scaling vs. pyml normalization, scaling, and translation

What is the proper way to normalize feature vectors for use in a linear-kernel SVM? Looking at LIBSVM, it looks like it's done by just rescaling each feature to a single standard upper/lower range. However, it doesn't seem like PyML provides a…
agrin
  • 11
  • 1
1
vote
0 answers

Leave one out cross validation Support vector machine

We were given some code for a support vector machine where we are supposed to implement leave one out cross validation. If I understand it correctly leave one out will create as many test sets as there are samples, which means that for a big data…
Norruas
  • 61
  • 1
  • 9
1
vote
0 answers

why roc-auc score in naive svm is greater than svm+oversample?

I working on sentiment analysis in imbalanced dataset.I have problem with naive svm classifer which gives better roc-auc score than svm+sampling.This is naive svm results(first sad brackets is roc-auc score,second is G-mean score and third is…
1
vote
3 answers

Loading a Dataset for Linear SVM Classification from a CSV file

I have a csv file below called train.csv: 25.3, 12.4, 2.35, 4.89, 1, 2.35, 5.65, 7, 6.24, 5.52, M 20, 15.34, 8.55, 12.43, 23.5, 3, 7.6, 8.11, 4.23, 9.56, B 4.5, 2.5, 2, 5, 10, 15, 20.25, 43, 9.55, 10.34, B 1.5, 2.5, 3.5, 4.5, 5.5, 6.5,…
user20304030
  • 37
  • 1
  • 7
1
vote
3 answers

How to load unlabelled data for sentiment classification after training SVM model?

I am trying to do sentiment classification and I used sklearn SVM model. I used the labeled data to train the model and got 89% accuracy. Now I want to use the model to predict the sentiment of unlabeled data. How can I do that? and after…
1
vote
1 answer

What is the best value for the parameter class_weight in LinearSVC?

I have a multi label data (some classes have 2 and some 10 labels)and my model is overfitting for balanced and None values.What are the best values to set for the class_weight parameter. from sklearn.svm import LinearSVC svm =…