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
2answers
24 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
12 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
14 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 ...
0
votes
2answers
96 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....
-1
votes
0answers
17 views

kernel function of support vector machine [duplicate]

I am trying the make a kind of image classification by using the Support Vector Machine. There are the kernel, gamma, and C functions. My question is how I can decide correct parameters for this kind ...
0
votes
1answer
26 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
37 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
31 views

ValueError: bad input shape

I have multilabel problem. I was using onevsrestclassifier and now i want to use onevsoneclassifier. ...
0
votes
3answers
85 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
41 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
25 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 ...
0
votes
1answer
37 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
14 views

Including validation set in my code for a Linear SVM classifier returns a Type error

I'm using a predict function for a linear SVM classifier: ...
0
votes
1answer
27 views

How to include validation set in the pipeline to tune parameters for an SVM?

I have a dataset already divided into train, test and validation set. How can I insert the validation in my pipeline? Code: ...
0
votes
0answers
27 views

SVM is taking too long for hyperparameter tuning

I am running SVM,Logistic Rregression and Random Forest on the credit card dataset. My training dataset has the shape (454491, 30). I performed 5-fold cross validation(which took more than an hour) ...
1
vote
1answer
76 views

Support Vectors of SVM

I have read somewhere that the value of slack variables of support vectors is not 0. Does that mean the points lying in the wrong region e.g a positive point lying in the negative region will also be ...
-1
votes
1answer
25 views

In SVM, what do the points and axis represent?

Usually the axis represent features and points represent the value. But for example in case of document classification, where each document is represented as a feature, what do the axis and points on ...
0
votes
1answer
37 views

How can I find if it is an overfitting problem?

I am new in Machine learning, and I want to detect emotions from the face. Preprocessing: I used equalizeHist to equalizes the histogram of grayscale images (JAFFE database with 213 images), in the ...
3
votes
1answer
47 views

When does it make sense to choose gradient descent for SVM over liblinear?

I understand using gradient descent methods with SVM is intractable if you've used the kernel trick. In that case, best to use libsvm as your solver. But in the case that you are not using a kernel ...
1
vote
1answer
38 views

Encoding for classifiers

I have some doubts regarding encoding (i am not familiar with tasks like these) categorical variables in order to use them as parameters in a model like logistic regression or SVM. My dataset looks ...
0
votes
0answers
19 views

TF-IDF Transform duplicating data

I'm working on a Sentiment Analysis task using TF-IDF to build my features and SVC as the classifier. My goal is to make my model to classify the sentiment of all my dataset. I already designed my ...
0
votes
1answer
30 views

Variables for SVM [closed]

I would like to predict if an email is spam or not spam based on the information that I have, i.e. date, email address, subject and text. Three of these parameters are text data, so they would need to ...
0
votes
1answer
23 views

Binary classification: how to transform features in real numbers?

I want to train a binary classification algorithm for spam detection using labeled data set. The dataset has the following features: ...
0
votes
0answers
14 views

How to change voice features in python without affecting speech/language features?

I am trying to build a CNN model which should be able to identify the language being spoken in an audio file. I have extracted the MFCC matrix (for 13 coefficients) for each audio file and trained it....
1
vote
0answers
13 views

Adaptive Sampling Strategies for SVM?

I am an Engineer interested in creating a surrogate model of a certain phenomenon in the context of reliability engineering. Essentially my quantity of interest is the Limit state function/stability ...
2
votes
1answer
192 views

How does C have effects on bias and variance of a Support Vector Machine?

The minimization problem for SVM can be written as- $$\overset{\text{min}}{\theta} C\sum_{i = 1}^{m}{[y^icost_1(\theta^Tx^i) + (1-y^i)cost_0(\theta^Tx^i)]} + \frac12\sum_{j = 1}^n{\theta_j}^2$$ Now, ...
0
votes
1answer
38 views

Classifiers and accuracy

I would like to ask you how to use classifier and determine accuracy of models. I have my dataset and I already cleaned the text (remove stopwords, punctuation, removed empty rows,...). Then I split ...
-2
votes
1answer
93 views

NotFittedError says this StandardScaler instance is not fitted yet while using inverse_transform() [closed]

I have a dataset and i have used Support Vector Regression.So i needed to use StandardScaler module from sklearn.preprocessing fro Feature Scaling. After training my model when i came to predict it ...
1
vote
2answers
236 views

Can we use BERT for only word embedding and then use SVM/RNN to do intent classification?

According to this article, "Systems used for intent classification contain the following two components: Word embedding, and a classifier." This article also evaluated BERT+SVM and Word2Vec+...
1
vote
1answer
34 views

What is lagrangian?

I'm watching an SVM tutorial. At 6:38 he mentions lagrangian, which is a term I'm not familiar with. So I googled it, hoping to find the Wikipedia article about it, ...
0
votes
1answer
37 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. ...
0
votes
2answers
41 views

i'm using GridSearchCV to find parameter C for SVC() classifier present in sklearn.svm . I'm not getting the optimal result desired

this is a screenshot of my code. i used abc.best_estimator_ (my GridSearchCV model) to find out best results. As you can see grid has values of C=1 and C=100 along with other values. abc....
0
votes
2answers
64 views

Don't understand why I get an inverse ROC curve for SVM (Python)

I build an SVM classifier but get an inverse ROC curve. The AUC is only 0.08. I've used the same datasets to build a Logistic Regression classifier and a Decision Tree classifier, and the ROC curves ...
1
vote
0answers
33 views

Accuracy gain vs amount of data in Neural Networks

There's a theoretical question I tackled upon in the excellent book Neural Networks and Deep Learning by Michael Nielsen, which I would love to discuss about. The ...
1
vote
1answer
23 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}^...
1
vote
2answers
41 views

How does SVM classify images?

I have read about SVM and understood that for complex divisions, the SVM theoretically plots the data into a higher dimensional plane such that the in the new dimension the data is linearly separable ...
2
votes
1answer
40 views

Stacked Model performance?

I am currently working with a dataset that seems very easily separable and I have an accuracy of 99% for SVM (NN-98%, RF-98%, DT-96-97% and I have checked for leakage & overfitting). As part of my ...
1
vote
1answer
69 views

How to use unigram and bigram as an feature on SVM or logistic regression [closed]

How to use unigram and bigram as an feature to build an Natural Language Inference model on SVM or logistic regression?on my dataset i have premise, hypotesis and label column. I'm planning to use the ...
3
votes
1answer
91 views

Decision tree and SVM for text classification - theory

I used 4 classifiers for my text data: NB, kNN, DT and SVM. As for NB and kNN I fully understand how they work with text - how we can count probabilities for all words in NB and how to use similarity ...
1
vote
2answers
21 views

Biasing SVM algorithm towards particular subset of data

I'm training an SVM model for sentiment analysis, based on social media data eg. tweets. The model will be trained using a small selection of a particular company's tweets in order to classify new ...
2
votes
1answer
131 views

Interpretation of scikit-learn one class svm scores

How can I interpret the scores generated by the function score_samples(X) from a scikit-learn OneClassSVM model? Is there a way ...
1
vote
0answers
87 views

Is C = 1/lambda in SVM?

I was looking through the documentation for SVM.SVC where it said: C: float, default=1.0 Regularization parameter. The strength of the regularization is inversely proportional to C. Must be strictly ...
0
votes
1answer
316 views

ValueError: Found input variables with inconsistent numbers of samples [duplicate]

I am trying to do svm model training and it gives this error: ValueError: Found input variables with inconsistent numbers of samples: [91, 212] Code: ...
0
votes
1answer
22 views

Text Classification on a very small data set with a lot of classes

I have a data set consisting of 455 rows spread over 21 different classes. The data set is imbalanced as well as you can see below. ...
2
votes
1answer
23 views

What supervised machine learning model can be used to generate a scorecard-like result?

A scorecard is typically used in Credit Application. One very common model for developing a credit scorecard is logistic regression since it has well-defined probabilities. Apart from logistic ...
2
votes
1answer
169 views

PCA shows overlapping boundaries, then why SVM performs best

I am trying to understand which model might work for a given problem before trying the models, I find this case against my knowledge. Please guide what I am missing. I am new to Data Science. Here is ...
3
votes
2answers
38 views

Which model is better for incremental learning?

I'm trying to implement face recognition. I'm planning to use some model (like DeepFace) to extract discriminative features and then use a classifier to recognize the faces. I'm confused as to which ...
1
vote
2answers
36 views

Identify the parameter causing the anomaly in a multivariate dataset

I have a payment transaction dataset with a large number of predictor variables. I am trying to build a model for anomaly detection and I have evaluated various algorithms/approaches for the same like ...
1
vote
3answers
50 views

What is the 1 Unit in the contraint of SVM: $y_i(wx_i+b) \geq1$

I am following this note on SVM. The constraint, $y_i(wx_i+b) \geq 1$, basically said all inputs, $x_i$, lie at least 1 unit away from the hyperplane on the correct side. What does it mean by 1 unit?...

1
2 3 4 5
10