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

Get negative predicted value in Support Vector Regresion (SVR)

I am doing Covid-19 cases prediction using SVR, and getting negative values, while there should be no number of Covid-9 cases negative. Feature input that I was used is mobility factor (where have ...
user avatar
  • 11
2 votes
0 answers
57 views

random_state on train_test_split() appears to have large effect in performance metrics?

To summarize the problem: I have a data set with ~1450 samples, 19 features and a binary outcome where classes are fairly balanced (0.51 to 0.49). I split the data into a train set and a test set ...
user avatar
  • 21
0 votes
1 answer
29 views

Training data in sentiment analysis

I'm doing sentiment analysis of tweets related to recent acquisition of Twitter by Elon Musk. I have a corpus of 10 000 tweets and I'd like to use machine learning methods using models like SVM and ...
user avatar
0 votes
0 answers
9 views

Objective Functions in Twin Support Vector Machines

I'm reading paper Twin Support Vector Machines for Pattern Classification by Jayadeva et al. (2007). In that paper, the authors proposed using two non-parallel hyperplanes for classifying two classes. ...
user avatar
0 votes
0 answers
19 views

How to get all the parameters of scikit-learn multiclass SVM classifier?

I have trained my multiclass SVM model for MNIST classification in Python using scikit-learn using the following code: ...
user avatar
  • 95
0 votes
0 answers
9 views

Can you use gplearn library to improve an SVM model?

I want to know your thoughts on this. Someone on the internet recommended this process to me in order to improve the accuracy of my SVM model: Split dataset with 5 folds stratified k-fold (SKF) Apply ...
user avatar
  • 21
2 votes
1 answer
17 views

What is custom SVM kernel?

What is custom kernel in the Support Vector Machine. How is it different from Polynomial kernel. How to implement a custom kernel. Can you provide a code to implement a custom kernel.
user avatar
0 votes
0 answers
11 views

I have a question about scaling test data in svm machine learning (binary)

I am making a machine learning model from qEEG(Quantification) data. EEG Data form different values for different human characteristics. To give an example, I will use the breast cancel data of the ...
user avatar
2 votes
1 answer
30 views

How do I use wavelet transform for feature extraction correctly?

I'm trying to classify words based on EMG signals using a support vector machine as my model. My dataset includes 15 classes (words) with 230 repetitions and 1000 features each. I already merged all ...
user avatar
  • 21
0 votes
1 answer
25 views

Why my models have a pretty high accuracy with a small training dataset?

I was wondering why my models (decision tree, svm, random forest) behave like that, with "high" accuracy on a small training dataset. Is it a sign of overfitting? The graph represents the ...
user avatar
0 votes
0 answers
31 views

Is SVM a good choice for this imputing a numerical variable?

Let's say I have 10,000 training points, 100,000,000 points to impute, and 5-10 prediction variables/parameters, all numeric (for now). The target variable is numeric, skewed normal with outliers. I ...
user avatar
0 votes
0 answers
12 views

Functional form for machine learning models

I am new to the field of machine learning and I have a question. Is there a way to print the function of any machine learning model, just like Y=mX + C (equation for straight line). For eg. support ...
user avatar
  • 1
0 votes
0 answers
41 views

How to improve the accuracy of support vector machine algorithms in machine learning?

I am working with a machine learning project named "Diabetes prediction using support vector machine". In this project I have used Pima Indians Diabetes Database. Using SVM I have got 78% ...
user avatar
1 vote
0 answers
19 views

How to estimate a best fitting line that separates variables on a scatterplot by some third binary outcome variable with 95% accuracy?

0 I've been thinking about this and haven't found a non-brute force method of doing it. I have a series of scatterplots depicting the relationship between two predictor variables and a third binary ...
user avatar
  • 11
1 vote
1 answer
21 views

How to classify a dataset containing variable size list of lists?

I have a dataset which has a list of lists as an input (each row) and the labels are in order of (0-9). The inside lists are of two lengths, 8 and 10. Each input list is of variable length ...
user avatar
0 votes
1 answer
20 views

How to print the corresponding c of the lowest classification error on the validation data

I'm currently measuring the overall classification error for an SVM classifier and I'm varying the regularization value C. In the following code, how can I print in ...
user avatar
1 vote
1 answer
23 views

Distinguishing text with opposite meanings in SVM (False Information Detection)

I am currently working on a Binary Text Classification Model (False Information Detection) using Support Vector Machine and used TF-IDF as text vectorizer in Python. I have already tried training the ...
user avatar
0 votes
0 answers
5 views

A support vector machine for separating pluses from minus finds a support vector at point (1,0) and a minus support vector at x2=(0,1)

Suppose a support vector machine for separating pluses from minus finds a support vector at point (1,0) and a minus support vector at x2=(0,1). Determine the values of w and b.
user avatar
  • 101
0 votes
0 answers
78 views

Using SVM as final layer in Convolutional Neural Network

I am working on the implementation of a hybrid CNN-SVM, where I define the use of SVM in the last layer of CNN as shown in this code: ...
user avatar
  • 95
0 votes
1 answer
20 views

If an SVM decision boundary is the perpendicular bisector of the line connecting the support vectors, why iterate for it using a loss function?

Would it not make more sense to do some linear algebra to find the vector of the decision boundary? Is that more computationally expensive?
user avatar
1 vote
1 answer
46 views

Input shape of dataset in hybrid CNN-SVM classifier

I am working on hybrid CNN-SVM for classification task, where I aim to use CNN for feature extraction and SVM for classification. So after the training of my CNN model as below: ...
user avatar
  • 95
0 votes
0 answers
10 views

Why the constraint always holds in soft margin SVM?

In the soft margin SVM, the loss minimization function is given as - Subject to $y_i(w^Tx_i + b) \geq 1 - \varepsilon_i$ and $\varepsilon_i \geq 0$ The 2nd constraint will always be true for any ...
user avatar
0 votes
0 answers
19 views

Why do we take +1. -1 for support vector hyperplane in SVM?

In the SVM, we have 3 hyperplanes, one for separating positive class and negative class, and the other two lying on the support vectors. In the figure - The equation of hyperplanes lying on support ...
user avatar
0 votes
0 answers
32 views

The best way to work with hybrid CNN-SVM

I am working on a hybrid CNN-SVM where I aim to use CNN for feature extraction and SVM for classification. However, I am confused as after reading related works, I found many approaches: -Some use SVM ...
user avatar
  • 95
2 votes
1 answer
147 views

Imbalanced data set with Sample weighting - How to interpret the performance metrics?

Consider a binary classification scenario whereby the True class (5%) is severely outbalanced to the False class (95%). My data set contains numeric data. I am using SKLearn and trying some different ...
user avatar
0 votes
0 answers
10 views

Support Vector Machines || find hyperplane and the w & b and the alpha value

here three points are given, they are the support vectors, two of them belongs to negative class an one is positive class, here we need to find the hyper plane and values of w and b and the alpha ...
user avatar
0 votes
0 answers
16 views

Minimizing W in SVM

When using SVM, we need to solve an optimization problem that maximizes the margin. Considering both positive and negative hiperplanes, we get something like: ...
user avatar
  • 125
5 votes
0 answers
40 views

How sklearn SVM find the initial hyperplane before Optimisation?

The optimization goal of the SVM is to maximize the distance between the positive and negative hyperplanes. But before optimizing, how sklearn first find the positive and negative support vectors and ...
user avatar
0 votes
1 answer
21 views

Labels in SVM algorithm

I am reading some ML books (Burkov's and Raschka's), and i have seen there, that for a binary classification problem using SVM, my "positive" label needs to be equal +1 and my "negative&...
user avatar
  • 125
2 votes
1 answer
47 views

Why does SVM considered as discriminative model?

I read in several places that SVM is a discriminative model, but SVM has no statistical aspects per se, by that I mean that is does not estimate any probablity, specifically the postirior distribution ...
user avatar
  • 123
0 votes
0 answers
12 views

Query regrading SVM Procedure

I referred to many sources for the math behind SVM. Here is a summary of my understanding. Please let me know if I got the logic of hard margin SVM right --> We fit a random hyperplane. Then ...
user avatar
  • 313
0 votes
0 answers
17 views

Best way to classify a high dimension dataset

I am writing a code to classify 4-body systems as 'stable' and 'unstable'. For this purpose, I generated a vast (~1 million) dataset of 4-body systems, and narrowed down the number of possible ...
user avatar
  • 53
0 votes
0 answers
18 views

SVM Marginal line query

In SVM, why are marginal lines drawn such that they touch some data points (support vectors)? Isn't the classification more accurate when no point is touched?
user avatar
  • 313
0 votes
0 answers
75 views

Dual Optimization SVM in Python using Numpy

I need to implement the dual function of SVMs optimization problem with numpy in Python and I am pretty stuck since I am not a Python or a numpy pro at all. Dual function evaluation What I want to ...
user avatar
0 votes
0 answers
20 views

Can PCA help to reduce false positives in image-based classification?

I'm working on a 2-class problem where cancer cells need to be accurately identified from a mixed population containing cancer cells + white blood cells (WBCs). The model I have been using - SVM with ...
user avatar
  • 1
2 votes
1 answer
36 views

SVM - Why we use the dual theorem?

Why in SVM we use the dual theorem? I can't understand why we cannot minimize the norm of the weights w directly.
user avatar
1 vote
0 answers
65 views

How to make Support Vector Machine source code without using libraries in R? [closed]

I want to estimate w and b using loops and functions. I also want to predict new variables. I need simple scratch code to understand the mathematics behind the Support Vector Machine.
user avatar
0 votes
0 answers
11 views

Support Vector Regression for Time-Series Model

As the title is clear, I would like to know it is possible to use SVR (Support Vector Regression) algorithm for Time-series problems?
user avatar
  • 101
0 votes
0 answers
44 views

How can I balance sentence data for NLP tasks

I have been given a task to train the SVM model on conll2003 dataset for Named Entity "Identification" (That is I have to tag all tokens in "Statue of Liberty" as named entities ...
user avatar
  • 165
3 votes
2 answers
651 views

Why SVM works well with high dimensional data?

I'm having troubles trying to understand why SVM works well with high dimensional data, the case when p >> n. I read the following: SVM is automatically regularized. You don't have to pick a ...
user avatar
1 vote
0 answers
38 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 ...
user avatar
1 vote
2 answers
51 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 ...
user avatar
  • 13
2 votes
0 answers
192 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 ...
user avatar
  • 21
1 vote
1 answer
29 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 ...
user avatar
  • 165
0 votes
0 answers
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 ...
user avatar
0 votes
2 answers
40 views

GridSeachCV not performing well on ML models

...
user avatar
0 votes
0 answers
91 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?
user avatar
0 votes
2 answers
82 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 ...
user avatar
1 vote
1 answer
56 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: $$ \...
user avatar
  • 137
1 vote
1 answer
44 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. &...
user avatar
  • 137

1
2 3 4 5
11