Questions tagged [svm]

Support Vector Machines (SVM) are a popular supervised machine learning algorithm that can be used for classification or regression.

Filter by
Sorted by
Tagged with
1
vote
0answers
4 views

What does it mean (non) convex "constraint"?

I was referring SVM section of Andrew Ng's course notes for Stanford CS229 Machine Learning course. On page 16, he says: SVM optimization problem can be given as follows: $$\begin{align} \max_{\...
0
votes
1answer
26 views

Understanding SVM mathematics

I was referring SVM section of Andrew Ng's course notes for Stanford CS229 Machine Learning course. On pages 14 and 15, he says: Consider the picture below: How can we find the value of $\gamma^{(i)}...
1
vote
0answers
31 views

What is the best way to flatten my data to be used by an SVM algorithm?

I am trying to classify data from an 8 channel SEMG sensor (different gestures) by using an SVM. So far, I have managed to record the data and for each channel, I've calculated 7 appropriate features, ...
4
votes
2answers
1k views

How can I use two different datasets as a training model for svm

I know that you're supposed to scale your test data using the parameters (mean and stdev) from your training data. This is relatively simple; but what if the number of samples is limited in one ...
0
votes
0answers
6 views

Invalid value encountered in double_scalars and UndefinedMetricWarning: Precision is ill-defined

This question I asked in stack overflow but didn't receive any comments yet Question Link
2
votes
2answers
43 views

Is it acceptable to use label encoding for nominal categorical data when one hot encoding would create too many features?

I'm working on a short data science project to compare the accuracy of different classification methods. The groups decided to use and compare Random Forest, Naive Bayes and SVM. The dataset we are ...
4
votes
1answer
445 views

Illustrating the dimensionality reduction done by a classification or regression model

Tl;DR: You can predict something, but how do you explain the prediction? Your usual classification/regression setup Lets say the data is a classic regression/classification problem: several numerical ...
1
vote
1answer
187 views

How to aggregate face embeddings of all photos of the same person?

I am classifying about 3000 thousand people's faces using FaceNet. Each person has about 100 photos. FaceNet first calculates a face embedding ( a feature vector) for each photo. So each person has ...
0
votes
1answer
11 views

Should you look at the correlation between data points before using SVM to classify the data? Why?

Total beginner here, so apologies if this comes off as a wild question. I am learning how to classify data in SVM. I saw an example on Kaggle where someone had included a correlation matrix on the ...
0
votes
1answer
47 views

Single image feature reduction at inference time : SVM

I am trying to train a SVM classifier using scikit-learn.. At training time I want to reduce the feature vector dimension. I have used PCA to reduce the dimension. ...
1
vote
1answer
115 views

SVM radial basis generate equation for hyperplane

I need to generate an equation for hyperplane, I have two independent variables and one binary dependent variable. Regarding this following equation for svm , $f(x)=sgn( sum_i alpha_i K(sv_i,x) + b )$...
1
vote
1answer
51 views

Support Vector Machines with soft margin: solving the dual form

I am currently struggling with finding an analytical solution for the $\alpha_k$. I have derived the following constrained optimization problem: $$ L = \sum_{i=1}^{N} \alpha_i - \frac{1}{2} \sum_{i=1}^...
4
votes
2answers
223 views

Support Vector Regression trained with data sets

I am now searching for a long time on the internet and on papers for an answers of simple questions. Am I able to train a Support Vector Regression algorithm with different data sets? If yes, how is ...
2
votes
2answers
988 views

How can I find anomalies in each row of data?

I have some reported data I want to spot anomalies on. The columns are a facility name then monthly reports of that given facility. ...
2
votes
2answers
81 views

Many separation line using RBF kernel in SVM

Below is my code, it take a range of a number, creates a new column label that contains either -1 or 1. In case the number is ...
109
votes
12answers
118k views

SVM using scikit learn runs endlessly and never completes execution

I am trying to run SVR using scikit-learn (python) on a training dataset that has 595605 rows and 5 columns (features) while the test dataset has 397070 rows. The data has been pre-processed and ...
0
votes
1answer
95 views

Support Vector Machine (SVM) for classification problem based on Earth Mover's Distance (EMD)

I would like to run SVM for my classification problem using the Earth Mover's Distance (EMD) as a distance measurement. As I understood the documentation for Python scikit-learn (https://scikit-learn....
1
vote
1answer
434 views

How should I construct a binary classifier for thousands of positive data and millions of unlabeled data?

So far, I have stumbled upon many advices and papers on PU Learning and Unary classification. TLDR: Does anyone have suggestions for specific algorithm or implementation for labeled data of only one ...
2
votes
3answers
57 views

If a categorical feature only occurs a few times in a data set, should I drop it?

I have a data set of mostly categorical variables. When I one-hot encoded them some of the features occur less than 3% of the time. For instance the Tech-support feature only occurs 928 times in a ...
0
votes
1answer
25 views

When should I use 'rbf' and 'polynomial' kernel trick in machine learning algo?

I have a problem about hate-speech classification using support-vector machine algorithm. The task is to identify the sentence that contains 'positive' or 'negative' sentiment. Which is the best ...
1
vote
0answers
78 views

Plotting SVM hyperplane margin

I'm trying to understand how to plot SVM hyperplane and its margins by this example: https://scikit-learn.org/stable/auto_examples/svm/plot_svm_margin.html And I got stuck at the plotting the ...
2
votes
1answer
41 views

Should bag of words in training set include test set data when doing text classification?

I'm doing text classification to identify 'attacks' from Wikipedia comments using a simple bag of words model and a linear SVM classifier. Because of class imbalance, I'm using the F1 score as my ...
1
vote
1answer
32 views

How can I weight each point in one-class SVM?

I want to give weights to some data points Specifically, these are points related to anomalies (I'm implementing one-class SVM for anomaly detection) Exactly, I want to consider some data points that ...
2
votes
1answer
158 views

Dataset where svm performance is significantly different from random forest

Is there a specific dataset where svm performs significantly better or worse than random forest? I know that the performance could depend on the dataset but is there a specific dataset?
1
vote
1answer
371 views

Naive Bayes and Support Vector Machine (NBSVM) Classification

I am relatively new to datascience and have a question about NBSVM. I have a two class problem and text data (headlines from the newspaper). I want to use NBSVM to predict whether a headline has the ...
2
votes
2answers
91 views

One-Class classification

I am currently using an one class classification svm and I am trying to boost the classification results by employing more than one svm-occ with varying gamma parameters and combine these decisions ...
1
vote
1answer
58 views

Implementing a weighted support vector machine in python

I have the following problem. The minimization problem of the SVM that I want to solve is: $$ \min_{w, b} \frac{1}{2}w^{T}w + \sum^{m}_{i=1}C_{i}xi_{i} $$ Subject to: $$ y_{i}(w^{T}x_{i} - b) \geq 1 - ...
0
votes
0answers
13 views

What is meant by data dependent kernel?

I was reading this research paper Isolation kernel and it's effect on SVM wherein they mention in the paper that data dependent kernels depend directly on the data.Is there a simple explanantion that ...
0
votes
1answer
123 views

Why does using a standard scalar on my tf idf matrix make it perform better?

I have a TF-IDF matrix transformed on a list of tweets from a data set I am using. I have a pipeline where I initiate a StandardScalar and then next have my SVM with a linear kernel and auto gamma as ...
0
votes
2answers
736 views

Which performs better in time series forecasting, LSTM or SVR?

I have run LSTM and SVR models on various datasets having sample values in the range of 1-4000 and the MAPE obtained in SVR was consistently lesser than that obtained through LSTM. I was told the ...
2
votes
1answer
54 views

Get how similarity between the training data and the income data?

I'am trying to use Clustering and Classification methods as SVM using scikitlearn. I'm also studying some outliers/novelty detections I want something like a semi-supervised model. I want to predict ...
2
votes
1answer
44 views

Version of Perceptron

If we change the $ywx<0$ condition (for performing update) to $ywx<1$ like in SVM (but without adding regularization to maximize the margin), is there any difference from the basic perceptron (...
1
vote
2answers
169 views

Implicit feature selection

I have heard that Random Forest and other tree based machines apply some kind of implicit feature selection. My Question is: Does this also apply for machines like the SVM? As far as I understand is ...
0
votes
0answers
9 views

Estimating a rbf kernel SVM, followed by Stochastic Gradient Descent

I wanna estimate a rbf SVM to predict property prices. My data set has 11 features and roughly 57,000 rows. When I set C=10, R^2 is about 0.88 while MSE and RMSE are 0.1191 and 0.3451. The results are ...
0
votes
1answer
19 views

SVMs: where comes the 1 and -1 in hyperplane equations and where is b?

Concering Support Vector Machines (SVM): it is always mentioned that $\textbf{w}^T\textbf{x}_i - b >= 1$, for $\textbf{x}_i$ of class 1 (i.e. $y=1$) and $\textbf{w}^T\textbf{x}_i - b <= -1$, ...
1
vote
1answer
41 views

Gaussian Kernel faster than Linear

I have a Dataset with 580 samples and 7 features. I compared the time between three kernels: Linear, Quadratic and Gaussian and using RandomizedSearchCV as the following: ...
7
votes
1answer
8k views

Multi-class classification v.s. Binary classification

A training set has five classes including: "label-A", "label-B", "label-C", "label-D", "others" But the problem ...
1
vote
1answer
207 views

Bert and SVM classification

I'm trying to understand the concepts in the title and how they fit into the task of binary classification. According to my understanding so far, you can encode text using various feature-extraction ...
1
vote
1answer
28 views

What is the best reference for multi-class SVM?

Can someone suggest some papers about the multi-classification methods by SVM? One against all? A good survey or paper which ...
1
vote
1answer
585 views

test accuracy of text classification is too less

I have a data set of movies and their subtitles. My task is to classify them based on their ratings - [R, NR, PG, PG-13, G]. I have 13 examples for each class. I preprocessed the subtitles in the ...
1
vote
1answer
481 views

K-fold-cross-validation if training dataset is much smaller than test dataset?

I'm a beginner in machine learning and I have a special case in which I have only a small training dataset of about 500 images and a test dataset of 10,000 images. Does it still make sense to do a 10-...
0
votes
1answer
14k views

AxisError: axis 1 is out of bounds for array of dimension 1

I've used svm classifier. Now I need to construct the confusion matrix. Here is the code that I have used. ...
1
vote
1answer
57 views

Non-Convex Constraints for Classification Problems

I am willing to create a hypothetical non-convex constraints for the purpose of practising nonlinear classification using an algorithm. I thought of such constraints in the form: $x^TAx + Bx \leq c$. ...
1
vote
0answers
30 views

Does linear kernel make SVM a linear model?

I have deleloped several SVR models for my case study using the linear kernel, and those models were optimized using the RMSE as criterion. Now Im searching for additional evaluation metrics and it ...
0
votes
0answers
10 views

How to avoid eegbci.load_data() and analyze each file and change classification methods?

I have a pipeline for EEG analysis using CSP and LDA for classification of EEG signals using MNE. ...
0
votes
1answer
3k views

GridSearchCV() to fine tune outputs ValueError and FitFailedWarning

I want to fine tune some parameters for my linear SVM. This is the code: ...
0
votes
1answer
56 views

Amount of data needed for deep learning vs support vector machine

I often read about the fact, that the amount of data to train and get a generalizing model for a deep learning algorithm is much higher in comparison, e.g. to a support vector machine. It makes sense, ...
0
votes
0answers
8 views

Same training and test data is fed to SVM RBF kernel in python and matlab giving different results

I have used 60 % data as training data and 40% data as test data. Exactly same instances of data are fed to SVM RBF kernel in Python and SVM Gaussian in MatLab. But the results of prediction in MatLab ...
0
votes
0answers
12 views

Is it efficient to use kernel trick in primal form of SVM?

I know we can use Kernel trick in the primal form of SVM. So the hypothesis will be - and optimization objective - We can optimize the above equation using gradient descent, but in this equation ...
0
votes
1answer
151 views

Sliding window approach using SVR & LightGBM

I'm working on a multivariate time series forecast using a couple of ML algorithms (Neural Networks, Support Vector Machines & Gradient boosting algorithms). I need to measure the performance of ...

1
2 3 4 5
11