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

SVM C vs gamma hyper tuning

While running SVC(), how we can hyper tune C vs gamma combination? I could see changes in C and gamma are impacting the accuracy differently. Also what i understand about C and gamma are : 1) C is ...
2
votes
2answers
38 views

Kernel selections in SVM

I want to understand the kernel selection rationale in SVM. Some basic things that i understand is if data is linear then we must go for linear kernel and if it is non-linear then others. But ...
1
vote
0answers
13 views

Equivalent procedure to Scikit-Learns class_weight=balanced in Keras?

I want to train a SVM and a CNN with the same unbalanced multiclass-dataset and want to compare the results. I use Scikit-Learn for the SVM and Keras for the CNN. My goal is that no class is ...
0
votes
0answers
8 views

How to implement Hinge loss in Support Vector Machine with SGD

I implemented a Support Vector machine as follows : Where J(Theta) is the Objective function. My code : ...
0
votes
0answers
14 views
0
votes
0answers
15 views

How to create a positive definite matrix from Dataset for solving svm dual optimization problem?

I try to implement a SVM from the scratch by myself and facing some issues when solving the dual optimization problem using qpsolvers. So I created linear separable data with sklearn ...
1
vote
2answers
18 views
2
votes
3answers
55 views

NLP and one-class classifier building

I have a big dataset containing almost 0.5 billions of tweets. I'm doing some research about how firms are engaged in activism and so far, I have labelled tweets which can be clustered in an activism ...
1
vote
0answers
17 views

How to Manually Classify using SVM?

Consider points x1 = (1,1), x2=(1,0), x3=(1,-1) from class C1 and points x4 = (-1,1), x5=(-1-1) from class C2. Classify the given data with SVM How do we manually classify data by finding the ...
1
vote
0answers
18 views

How to create an roc plot and calculate AUC for an svm (that does not return probabilities)?

I have some SVM classifier outputting final classifications for every sample in the test set, something like 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1 and so on. The "...
1
vote
4answers
248 views

ROC curve interpretation

I trained a CNN model and a combined CNN-SVM model for classification. I wanted to compare their performance using ROC curve but I was confused which model is better. How to interpret the given ROC ...
2
votes
1answer
43 views

How can different classification algorithms expressed as neural networks?

I have heard that each of the different classification algorithms can be expressed as a neural network architecture. How can the different algorithms like Logistic Regression, SVM(Support Vector ...
3
votes
2answers
113 views

What is the difference between LS-SVM and P-SVM?

What is the difference between least-squares SVM (LS-SVM) and proximal SVM (P-SVM)? How does the decision boundary change in case of both of these types of SVM?
0
votes
1answer
35 views

Genetic algorithms: what connection to support vector machine / naive bayes

I found the following list of seven classifiers: Linear Classifiers: Logistic Regression, Naive Bayes Classifier Nearest Neighbor Support Vector Machines Decision Trees Boosted Trees Random ...
0
votes
1answer
8 views

SVM, which range to use when normalizing

I am using the SVM classifier from Scikit Learn. I was wondering is there is a know-best-practice when it comes to normalization. I'm using different normalization tecniques, but all my normalized ...
0
votes
0answers
10 views

Machine learning algorithm for classifying a 2xN array of ranged coordinates?

Good afternoon, I have a dataset of lists of coordinates that are ranged from (0, 100) on the Y-axis and (0, 300) on the x-axis, with double precision. I'm looking into classifier algorithms that ...
0
votes
0answers
17 views

In SVM, is the support set still small if kernel trick is used?

In SVM, we classify y based on whether f(x) > 0 or f(x) < 0. I understand that in SVM with f(x) being linear in x, the support set is typically small (i.e., the number of support vectors is much ...
1
vote
2answers
93 views

Which scoring for GridSearchCV is best, when imbalanced multiclass dataset?

I have an unbalanced multiclass dataset (GTSRB) and want to optimize the hyperparameters of an SVM through GridSearchCV. I know that accuracy is not suitable for scoring in this case. Which evaluation ...
0
votes
0answers
9 views

How can I classify single fused gray scale image in python ? is it possible to binary classsify single output image with Ground Truth image?

I want to calculate the precision, recall, and accuracy of the single predicted image(y_pred) with the Ground truth (y_true) image. I have only two binary class (0 and 1) so my question is, ** is it ...
0
votes
0answers
18 views

Do not scale Hog features?

when I train LinearSVC with the Hog features extracted from the Fashion-MNIST dataset then I get better results if I don't use StandardScaler before training than I use it. ...
1
vote
1answer
73 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
0answers
23 views

Feature importance in SVM

Why is there no command for feature importance in SVM like the one provided in Random Forest feature_importance_ from ...
0
votes
0answers
23 views

How can I map the sample from the original feature space to the new kernel feature space? (Sk-learn)

Let's say I have a very basic SVM model, implementin sk-learn: clf = SVC(kernel='rbf', class_weight=weights, gamma=gamma) clf.fit(X,y) X is the sample space with ...
0
votes
1answer
39 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$. ...
0
votes
0answers
9 views

How to upload a sklearn SVM model as a chrome extnesion?

I have trained an SVM/Logistic regression machine learning model using its scikit implementation. But now I want to do the same with Tensorflow/Keras. This is for easy conversion to Tensorflow.js. ...
1
vote
1answer
42 views

How to deploy machine learning models as a chrome extension?

I have trained a stance detection model using SVMs. Wanted to know how can I deploy this as a chrome extensions. I do understand that the question is a bit broad but any links, suggestions etc. will ...
1
vote
1answer
37 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 ...
1
vote
1answer
48 views

(Scikit-learn) differences between LinearSVC, 'linear' kernel SVC and poly kernel SVC with degree 1

I would like to know the differences between: linearSVC() SVC(kernel='lineaer) ...
1
vote
1answer
34 views

SVM hyperplane margin

so that $H_0$ is equidistant from $H_1$ and $H_2$. However, here the variable $\delta$ is not necessary. So we can set $\delta=1$ to simplify the problem. $$w\cdot x+b=1 $$ and $$w\...
1
vote
0answers
11 views

Understanding the ||w|| = 1 constraint for SVMs

Is it correct to say that the reason why ||w|| is set to 1 in the formula for the geometric margin is that it then is the sane as the functional margin (i. e. gives the same information) why still ...
1
vote
0answers
45 views

Difference between C and lambda in SVM

I've been taking the coursera machine learning course and The instructor said that if ( C = 1/lambda ) then the learning algorithm would reach the same optimal value of theta does this mean that ...
2
votes
2answers
335 views

Binary classfication vs One-class classification

Why do we need samples of both classes for the training of binary classification algorithms, if one-class algorithms can do the job with only samples from one class? I know that one-class algorithms (...
0
votes
0answers
14 views

How to obtain the predictions of SVM model on single input?

So, I am trying to build a Spam detection model. It is trained on a dataset consisting of about 3500 messages. I used SVM to build a model. But, if I now wish to find out whether a message is spam or ...
0
votes
1answer
51 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 ...
0
votes
2answers
61 views

Why use deep neural networks over methods like linear regression or SVM?

This is a very broad question, but I was wondering why researchers would choose a deep neural network over linear regression or SVM? As in, what are the advantages and disadvantages of both?
1
vote
0answers
8 views

Soft Margin SVM kernels

Kernels are used to map datasets into higher dimensions so that they could be linearly separable. However, if we introduce the slack variable in the soft margin SVM, we are allowing some mistakes, and ...
0
votes
0answers
11 views

Support Vector Machine (SVM) kernels

I learned that Kernels in SVMs are used to map the datasets into a higher dimension to make it more linearly separable, and the kernels will produce only the result, so we don't even have to know what ...
1
vote
1answer
31 views

How Linear SVM Regression and Multiple Linear Regression different in terms of the regression result?

They starts from the same equation as below. y = w*x + b But they solve it differently. MLR specified the w and b by minimizing the square error whereas SVM specified w and b by minimizing the loss ...
1
vote
1answer
279 views

svm.LinearSVC: larger max_iter number doesn't always increase the accuracy/precision/recall

Background: Supervised machine learning Data shape 10+ features, target = 1 or 0 only, 100,000+ samples (so should be no issue of over-sampling) 80% training, 20% testing train_test_split(X_train, ...
0
votes
2answers
46 views

SVM Loss Function

I have learned that the hypothesis function for SVMs is predicting y=1 if transpose(w)xi + b>=0 and y=-1 otherwise. However, according to the loss function above, it implies that transpose(w)xi + b ...
0
votes
0answers
13 views

Quadratic programming and Lagrange multiplier in SVM

I am a little confused because for some simple functions and constraints, using the Lagrange multiplier will be able to solve for the variables. However, in the SVM Lagrange expression, I learned that ...
0
votes
0answers
17 views

About SVM cost function and Lagrange

I just watched the MIT video on the intuition and mathematics behind SVMs, and overall, I learned that the objective is to minimize the margin or the distance between the support vectors with some ...
0
votes
1answer
134 views

Why my svm.SVC.fit( ) (linear kernal) run so long time?

I am using sklearn.svm.SVC( ) to train & test my dataset. 80% are used for training, 20% are used for testing. Here is my Python code: ...
0
votes
0answers
7 views

Implementing Linear SVM with One-sided Soft Margin

In my use case, I have two sets of datapoints $X$ and $Y$ which we want to "approximately" linearly separate. These sets represent the entire population, so I'm not concerned about generalization. In ...
0
votes
1answer
26 views

Feature addition/ subtraction and SVM model accuracy

I am working on a text classification problem where I would like to improve the accuracy of my model. Presently, I am using SVM with linear SVC and OneVsRestClassifier. The model should correctly ...
0
votes
0answers
29 views

GridSearch on imbalanced multi-class dataset

I have an imbalanced multi-class dataset (GTSRB) and would like to use GridSearch to determine the hyperparameters for an SVM. As metric for the evaluation I chose F1 with average macro. ...
0
votes
0answers
11 views

how use RBF for primal model of svm?

I know if we want to solve primal model of non-linear SVM, we have to generate new features. for example for kernel (1+xz)^2 for primal problem for any pair of features x1 and x2 we have to generate: ...
0
votes
1answer
32 views

How can I imporve accuracy for text classification and mapping using SVM?

I am working on a problem where I need to predict the text corresponding to another text in my training data file. For example: if I have value like the software in one of my columns and another ...
2
votes
0answers
16 views

Designing Custom Kernel from my Mathematical model

I derived a mathematical model for a porous system and the final function looks like this , after going through the Mercers Theorem and its condition for a kernel I would love to write an SVM kernel ...