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
1answer
18 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
17 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
15 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
11 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
21 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: ...
1
vote
1answer
22 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
19 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
17 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
23 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
22 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
18 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
8 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
16 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\...
0
votes
0answers
26 views

Results of quadratic SVM in Matlab are different from the results obtained in Python

I am trying to replicate a quadratic SVM classifier from Matlab to Python, however I am having different results regarding the accuracy. In Matlab the accuracy is 0.8955 meanwhile in Python the ...
0
votes
1answer
43 views

How important is outcome variable scaling in SVM regression?

Should I scale outcome variable for SVM regression? What is the magnitude of impact of outcome variable scaling in SVM regression?
-2
votes
3answers
51 views

How to decrease $R^2$ value and change it to positive value [closed]

I'm working on a data, and use regression , as you see bellow: from sklearn.svm import SVR regressor = SVR(kernel = 'linear') regressor.fit(trainX,trainY) above ...
1
vote
0answers
12 views

Machine learning model (neural network or SVM) for unequal feature matrices size

I have feature matrices obtained from visual bags of words model for various dictionary sizes. Example, Nx5, Nx10, …., Nx15000. Where N is the number of samples and 5, 10, …15000 are the visual ...
3
votes
2answers
112 views

Preprocessing: StandardScaler() Do we really need mean to be zero?

For instance, many elements used in the objective function of a learning algorithm (such as the RBF kernel of Support Vector Machines or the l1 and l2 regularizers of linear models) assume that all ...
0
votes
0answers
46 views

Confusion matrix : Train data accuracy lower than test data accuracy and 95%CI meaning

Let's say that I have training data and test data. I trained the model with the training data and then constructed a confusion matrix of the predictions of both. I am getting that the prediction of ...
1
vote
1answer
83 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 ...
3
votes
2answers
85 views

Understanding Learning Curves

I would like to clarify my understanding of learning curves with two example plots below. I am experimenting with small data sets here between 500 and 1500 samples to clarify my understanding. My ...
2
votes
2answers
47 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 ...
0
votes
1answer
54 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 ...
2
votes
0answers
48 views

Intuition behind One Class SVM (Scholkopf)

I am trying to understand the intuition behind the idea of finding a hyperplane that separates the training data from the origin in the feature space. Why separation from origin with a hyperplane ...
0
votes
0answers
46 views

Overfitting in imbalanced dataset

I am working on a dataset related to an insurance company and the objective is to predict if the insurance buyer will claim their travel insurance or not. Training data: https://raw.githubusercontent....
1
vote
0answers
20 views

SVM is margin determined by nearest datapoint or nearest datapoints?

I am studying support vector machines and different resources seem to define the margin differently. Some define the margin as 2 times the distance to the nearest datapoint. Others define the margin ...
1
vote
2answers
64 views

How plot GridSearch results?

I trained an SVM model with GridSearch ...
0
votes
0answers
419 views

UserWarning: No contour levels were found within the data range

I am running the exact example give in this SVM example of Scikit learn without any modification. I get the following warning. ...
1
vote
1answer
78 views

How to find the initial hyperplane in a Support Vector Machine (SVM)?

As far as I understand Support Vector machines, we are trying to find the optimal hyperplane, out of all hyperplanes that are equidistant from the support vectors. There are an infinite number of ...
1
vote
1answer
86 views

Support Vector Machines (SVM) vs Minimum distance between two convex hulls [closed]

Imagine that we have two sets of seperable points, X and Y, in the plane (R^2) that we want to classify. To find the optimal line (hyperplane) that separates these two sets of points we can: Run a ...
0
votes
0answers
32 views

SVM overfitting with consistent validation results

I have some imbalanced (1400 samples of which 250 are +ve) data for a binary classification problem and I am running an SVM grid search optimising for precision. I am trying 3,4,5,6,7,and 8 stratified ...
1
vote
0answers
30 views

SVM with gradient descent

The constrained optimization problem in SVM is given by min 1/2 ||w||^2 s.t y(i)(w^T x(i) + b >= 1 for all i Now converting this to an unconstrained optimization problem gives the lagriangian L as ...
0
votes
1answer
22 views

Why multi-class SVM can't detect some classes?

I use PCA and multi-class SVM for classifying 4-class problem in the Python environment. But in results, I see some differences in detection rate (Unweighted Accuracy in this problem). For example: ...
0
votes
0answers
32 views

Existing library or code for - SVM as classifier in the last layer of neural network/deeplearning

I have read many articles which replaced cross-entropy or softmax layer with SVM classifier in neural network. Their results suggested SVM-NN (SVM as classifier) outperformed softmax, cross-entropy. (...
2
votes
0answers
16 views

Non semi positive definite kernel matrix

What happens if we run a support vector machine model using a kernel that does not satisfy requirements such as non-positive semi definite? This is my flow of thought: In kernel methods $w.x$ is ...
1
vote
1answer
76 views

SVM - Making sense of distance derivation

I am studying the math behind SVM. The following question is about a small but important detail during the SVM derivation. The question Why the distance between the hyperplane $w*x+b=0$ and data ...
1
vote
0answers
95 views

SVM on BERT-Embeddings with very small dataset does not converge

I am trying to reproduce the results from this paper where they use a linear SVM on top of BERT-Embeddings for text-classification. They use the average of the token-embeddings which results in a 768 ...
1
vote
2answers
68 views

How much data do you need to build a classifier?

I would like to ask you what a good size of dataset would be for building a classifier. I know that there are datasets of 1000 obs and datasets of 1m obs. But I also read papers where classifiers were ...
1
vote
0answers
40 views

Why Imblearn pipeline gives very different results when used scaler and under sampling method swapped

I am using the Kaggle's credit card fraud detection dataset (https://www.kaggle.com/mlg-ulb/creditcardfraud) In order to create a balanced datasets I was testing RandomUnderSampler() and NearMiss(). I ...
0
votes
0answers
23 views

Continue with LSTM or try other approaches?

I am trying to predict error (deviation from the actual behavior) in a signal, here is an example Blue -> Reference/Actual signal (cannot be fed to the network, used to calculate error only) Orange ...
0
votes
0answers
27 views

How to tune gamma for one class SVM?

I have 2 set of numbers: one big (300.000+ numbers) and one little (50- numbers). Assuming that the elements of the little one form a cluster I want to identify the elements of the big one that belong ...
1
vote
2answers
8k views

ValueError: y should be a 1d array, got an array of shape (285, 30) instead [closed]

I am using this data set below and I am trying to find the support vector machine of the data set. Also I have my code and error below as well. http://scikit-learn.org/stable/modules/generated/sklearn....
0
votes
1answer
31 views

GridSearchCV Acting Weird

I am using GridSearchCV to find the best combination of parameters for SVM. However, the parameters chosen by GridSeasrchCV do not seem to be the best ones. I tried some parameters randomly and they ...
1
vote
1answer
54 views

Is Recursive Feature Elimination finding best features subset?

On a set of 9 features I have applied Recursive Feature Elimination (RFE) algorithm using SVM estimator, following approach from (1). When requesting a subset of size 1 to be found, then RFE returned ...
0
votes
0answers
353 views

ValueError: bad input shape

I have multilabel problem. I was using onevsrestclassifier and now i want to use onevsoneclassifier. ...
0
votes
3answers
294 views

Why is the accuracy of a LinearSVC not the same as the SDGClassifier?

I'm fine tuning parameters for a linear support vector machine. There are multiple ways to do it, but I wanted to compare LinearSVC and SDGClassifier in terms of time. I expected the accuracy score to ...
1
vote
0answers
45 views

Support Vector Machines

I have ASCII data which converted from raster data in ArcGIS. I would like to use Support Vector Machine (SVM) algorithm to create a flood prediction map. My question is that can I use ASCII file ...
1
vote
1answer
39 views

Standardization on training and split data

I am confused on which of the following should be used for standardization: method 1: fit transforming training data and only transforming test data ...

1
2 3 4 5
10