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
30 views

How to handle unclassifiable data in the dataset

Premise: Classification problem Input is three text fields Output classes are A, B, A&B (Note: A and B are not always exclusive though usually are, hence the 'A&B' class) Sci-Kit Learn is the ...
1
vote
1answer
23 views

How to apply two input and one output with LR and SVM

Q1: how to feed 2 input to LR and SVM? My dataset consist of three columns which are: sentence1 , sentence 2, and label (1 if the sentence2 is a paraphrased of sentence1) I prepare my data and convert ...
2
votes
0answers
27 views

Why is the leave-one-out error for support vector machines equal to the number of support vectors divided by the number of training examples?

Elementary question about support vector machines. Given a support vector machine classifier and a linearly separable dataset. Why is the leave-one-out cross validation error said to be bounded by the ...
1
vote
1answer
16 views

How should I engineer features for Named Entity Identification task?

I was working on Named Entity Identification (not recognition) task. In this NLP task, given a sentence, model has to predict whether each word (aka token) is named entity or not. The dataset used ...
0
votes
0answers
3 views

How to use Time Series Data from dynamic curves for SVM training in Matlab?

I am working on a task to classify dynamic curves from a simulator that provides matrices with time series data for each simulation. How to preprocess it in order to be used in matlab classification ...
0
votes
2answers
27 views
0
votes
0answers
14 views

Why doesn't SVC in Sklearn have n_jobs hyperparameter?

Why doesn't SVC in Sklearn have n_jobs hyperparameter unlike other algorithms such as Randomforest or Logistic Regression?
0
votes
2answers
40 views

How do I deal with unbalance classes in a stock market prediction problem?

I am working on a prediction model to predict whether a stock should sell, hold or buy in n days. Each day (or row in the dataset), I classify whether this should ...
1
vote
1answer
22 views

Understanding SVM's Lagrangian dual optimization problem

I was going through SVM section of Stanford CS229 course notes by Andrew Ng. On page 18 and 19, he explains Lagrangian and its dual: He first defines the generalized primal optimization problem: $$ \...
1
vote
1answer
17 views

Understanding Lagrangian equation for SVM

I was trying to understand Lagrangian from SVM section of Andrew Ng's Stanford CS229 course notes. On page 17 and 18, he says: Given the problem $$\begin{align} min_w & \quad f(w) \\ s.t. &...
2
votes
2answers
88 views

Best approach for text classification of phrases with little syntactic difference

So I have the task of classifying sentences based on their level of 'change talk' shown. Change talk is a psychology term used in counseling sessions to express how much the client wants to change ...
0
votes
1answer
53 views

Understanding Lagrangian for SVM

I was referring SVM section of Andrew Ng's course notes for Stanford CS229 Machine Learning course. On page 22, he says: Lagrangian for optimization problem: $$\mathcal{L}(w,b,\alpha)=\frac{1}{2}\...
1
vote
1answer
34 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
48 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
35 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, ...
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
0
votes
1answer
14 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
34 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
81 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 ...
1
vote
1answer
36 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 ...
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
0answers
10 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
0answers
34 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
0answers
9 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 ...
1
vote
0answers
29 views

One-class SVM formula

Recently I have been studying one-class SVM and am a little bit confused about the offset $\rho$. The common optimization problem is to find a function $f(x)= w^\top x-\rho$ by solving $$\begin{array}...
1
vote
1answer
45 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: ...
1
vote
1answer
59 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
22 views

what is the effect of initial weights on model training for different algorithms

If I do a model training on a dataset with three different algorithms Logistic Regression (L1), SVM(S1) and a Neural Net(N1). If I train the models again with the same data set and same parameters ...
1
vote
1answer
53 views

regression with noisy target vairable

How can I approach a regression problem where the input data is not noisy but the target variable is noisy? Are there any regression algorithms that are robust to a noisy target variable? Also, is it ...
2
votes
1answer
42 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 ...
0
votes
0answers
37 views

Inconsistancy in Sklearn SVM predict() and predict_proba()

Actually I have two questions. One of them is related the bug of sklearn SVM model and the other one is about ROC-AUC score. My first question is related to ROC-AUC score but also includes a bug ...
0
votes
1answer
26 views

How the Support Vector Machine will perform if the bias b = 0 in the equation of hyperplane?

We have a soft margin linear SVM and the equation is as follows : How the SVM will perform if b = 0, means the hyperplane is passing through the origin ?
0
votes
1answer
30 views

Non IID variables and SVM Classifier

I am training an SVM model to predict the trend of stock prices (one-day ahead predictions. Classification task). It Had completely slipped from my mind that SVMs assume IID data until I had a ...
1
vote
1answer
35 views

Linear Learning Machines

I was reading about Linear Learning Machines (LLMs) and learned that it is closely related with SVMs. Would like to know an example of any concrete problems that can be classified by LLM as I couldn't ...
1
vote
1answer
21 views

What if Training and testing dataset comes from the same source?

I am working on a classification problem in which I have to distinguish between healthy and damaged plates. when I use the combination of k-means clustering and SVM algorithm together with 10-fold ...
0
votes
1answer
21 views

Get the prediction probability using prediction function

I'm new to SVM models. I took custom SVM classifier from the github. In there standard predict function was overwritten by custom predict function. ...
0
votes
0answers
22 views

Different learning curves on each run

Sorry for the wrong terminology I might use, since I’m a noob. For my supervised learning project for the university I have a dataset (features and labels) which has to evaluated in several ways and ...
0
votes
0answers
16 views

How do i improve my accuracy in LinearSVC? Looking for better approaches/advices

I'm struggled to get accuracy around 70 used all the tricks and tips to improve it but couldn't make it my goal is to get at least 90+ accuracy. Trained 2 folders with 4000 images 2000 images for each ...
1
vote
0answers
43 views

Interpreting one-class SVM

I am new to SVM (one-class) and was practically investigating it. Got some weird result that I can not explain. Let me demonstrate by some small reproducible code and visualization: ...
2
votes
2answers
46 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 ...
1
vote
1answer
22 views

Support Vector Classifier and cost C

Applying SVC (Support Vector Classifier) to the 1-d data shown here: What will be the support vectors for the parameter cost C=0 and C=Infinity? As far as I read about SVM and hyper parameter C I ...
0
votes
0answers
20 views

Problem in working out an example of SVM: mathematical steps

I am trying to code SVM from scratch using a small toy problem that involves five support vector values. In the code below, there are 5 support vectors arbitrary chosen and denoted by the variables <...
1
vote
1answer
28 views

Why is the optimal C chosen by GridSearchCV so small?

I'm trying to use GridSearchCV to select the optimal C value in this simple SVM problem with non-separable samples. The issue I'm having is that when I run the code the optimal C is chosen to be ...
1
vote
1answer
23 views

Need help understanding Hard SVM quadratic program equation

This is from the textbook "Understanding Machine Learning" by Shalev-Schwarz p. 169. Can anyone help me understand why the solutions to this optimization problem need to be divided by the ...
0
votes
1answer
23 views

Steps to fit a Machine learning model for prediction of up and down market movement

I have around 5 years of data of an index containing many features on a daily basis. I want to classify whether the index will move up or down the next trading day (up or down movement is determined ...
0
votes
0answers
10 views

Classification with disjoint boxes

Are there any classification schemes like a support vector machine that use axis-aligned boxes instead of hyperplanes? I have a dataset consisting of about a billion points in 9 dimensions, which are ...
1
vote
0answers
18 views

Finding the dual to an optimization problem on an unsupervised dataset [closed]

We consider the unsupervised dataset $x_1,..x_N \in R^d$ and the optimization problem: $$min_w \,\frac{1}{2}{\left\lVert w \right\rVert}^2,$$ subject to constraints:$$\forall_{i=1}^N: \phi(x_i)^Tw\...

1
2 3 4 5
11