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
0
votes
1answer
31 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
1answer
24 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
1answer
21 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
39 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
vote
1answer
7 views

Tuning SVM C parameter

I would like to ask for help regarding my model. I have a dataset of preprocessed images and I performed a binary classification with SVM on Python. I tuned the value of the c parameter from 0.001 to ...
0
votes
0answers
5 views

Which qp solver is best for Support Vector machine implementation?

I'm trying to implement svm from scratch. I have used cvxopt to solve svm dual problem. cvxopt doesn't seem to produce accurate result when compared with other standard library. Are any other good ...
0
votes
0answers
25 views

Is it ok to get different results in my implementation of svm when compared to other library?

I'm trying to implement svm for learning purpose using cvxopt in python. To check wheather my implementation works or not I compare with results of sklearn. Weights and biases of model where different ...
0
votes
0answers
19 views

AxisError: axis 1 is out of bounds for array of dimension 1

I've used svm classifier. Now I need to construct the confusion matrix. Here is the code that I have used. ...
1
vote
0answers
36 views

If we use a generalized quadratic loss in a SVM model, what generalization performance bounds can be derived?

If we write an objective function: $$\frac{1}{2}||\vec{w}||^2 + C \vec{\xi}' S \vec{\xi}$$ with the usual SVM constraints, and $S_{i,j} = e^{-\gamma || \vec{x_i} - \vec{x_i}||^2}$, where $\gamma$ is ...
1
vote
0answers
57 views

Hyperparameter tuning one-class svm

I have a problem where I am trying to apply a one-class svm to detect outliers. I am training on a dataset of true cases using a one-class radial svm and then predicting for both false and true cases. ...
0
votes
1answer
13 views

Amount of data needed for deep learning vs support vector machine

I often read about the fact, that the amount of data to train and get a generalizing model for a deep learning algorithm is much higher in comparison, e.g. to a support vector machine. It makes sense, ...
0
votes
1answer
26 views

Suspiciously low False Positive rate with Naive Bayes Classifier?

I am performing phishing URL classification, and I am comparing several ML classifiers on a balanced 2-class data-set (legitimate URL, phishy URL). The ensemble and boosting classifiers such as ...
0
votes
1answer
37 views

Two-class model with predicted scores needed - classification or regression approach

In my problem, step one is to build a model to classify cases as one of True or False (1 or 0 could also be used obviously). Once the optimum model is found, step two is to retrieve probabilities for ...
0
votes
1answer
18 views

Having trouble understanding the x and y axis in SVM when training and testing data

I wrote some code based on this article. In the code in the article they have created a partition of 80 percent test and 20 percent data ...
1
vote
1answer
31 views

How to use a RBF kernel to create a “Kernel Space” using the similarity of each pair of point?

I am trying to use Semi-Unsupervised clustering using reinforcement learning following this paper. Assume I have n data-points each of which has d dimensions. I also have c pairwise constraints of ...
1
vote
1answer
20 views

Can I use SVC() as a base_estimtor for ensemble methods?

I am currently testing out a few different ensemble methods on my dataset. I've heard that you can also use support vector machines as base learners in boosting and bagging methods but I am not sure ...
0
votes
1answer
21 views

How to compare performance between SVM and Keras models

I applied both SVM and CNN (using Keras) on a dataset. Now, I want to compare the performance of both models. Keras model.evaluate function predicts the output for the given input and then computes ...
0
votes
0answers
11 views

Is calculating Lagrange multipliers in SVM mandatory

I wanted to implement SVM algorithm in my holidays. I read many resources. And one of the hard things to understand was Lagrange multipliers. \begin{equation} L=\sum_{i}{\alpha_i - \frac{1}{2}}\...
2
votes
0answers
29 views

How to implement SVM from scratch?

I am trying to build a SVM from scrath and I would like to maximize this Lagrarian expression: I know what variables means but I would like to know how this maximization is implemeted. Should I start ...
0
votes
1answer
43 views

Understanding SVM Kernels

Following Andrew Ng's machine learning course, he explains SVM kernels by manually selecting 3 landmarks and defining 3 gaussian function based on them. Then he says that we are actually defining 3 ...
0
votes
1answer
21 views

Ways to increase recall in SVM

I am training an SVM on UCI's Bank Marketing Data Set, the bank additional-full.csv. As the data is skewed I am also interested in recall. I am getting accuracy of about 87.95% but my recall is around ...
0
votes
1answer
24 views

How to consider categorical variables in distance based algorithms like KNN or SVM?

For example lets say I have a dataset with independent features age, gender, name, and income. While my dependent variable is load approval status. If I want to use KNN or SVM, do I need to convert ...
0
votes
1answer
22 views

Why don't get the expected result using a SVM training model?

I want to learn a model for recognizing facial emotions. . I used a dataset with 213 samples. I extract firstly features using the Gabor filter. Then, I reduce the data dimensionality with the PCA and ...
0
votes
1answer
20 views

How to compare supervised learning algorithm and it's technique ensemble learning algorithm?

I have to compare Support Vector Machine and Random Forest algorithm , but i'm confused how it can be compared, like support vector machine is supervised learning algorithm and random forest is ...
7
votes
3answers
165 views

Understanding Classifier performance on text data

I am working on a multi-label text classification problem(Total target labels 90). The data distribution has a long tail and class imbalance and around 1900k records. Currently, I am working on a ...
0
votes
1answer
45 views

How to choose a kernel function and a feature mapping function?

Although, after extensive of reading, I know the concepts of support vector machines pretty well by now, I have trouble translating the concept of the kernel function $K$ and the feature mapping ...
1
vote
0answers
11 views

How to plot the hyperplane for multiclass target variable in SVM?

Please suggest me how can I draw the hyperplane for a 7 class target variable. I'm doing my project in python 3.7 in Spyder.
1
vote
0answers
13 views

What is the kernel matrix used for in the kernel trick?

I have $n$ linearly inseperable datapoints, $x_1 \dots , x_n$. I use the kernel trick to map and compute the dot product in higher dimensions (without actually mapping / transforming the data). ...
1
vote
0answers
15 views

Do I have to wrap multiclass SVM in OneVsRestClassifier()?

I am using an SVM for mulitclass classification between 3 labels (1,0,-1). I thought this could simply be done by using SVC(decision_function_shape = 'ovr') in my ...
1
vote
1answer
36 views

Not Access to Confusion Matrix in SVM.SVC.score Scikit-learn Python

I used SVM.SVC function to classify. But when I wanted to calculate the weighted and unweighted average accuracy I couldn't access the confusion matrix. Because of svm.SVC.score only provides a ...
0
votes
0answers
61 views

Generalized quadratic loss learning

I'm studying a binary classification task with an objective function, derived from SVM, defined so: $\vec{\xi}' S \vec{\xi}$ with: $y_i (f(\vec{x}_i)) >= 1 - \xi_i, i=1..l$ and: $\xi_i >=0,...
-1
votes
1answer
23 views

How to select the best features for Support Vector Classification

I have a feature set that contains approximately 2 dozen features of technical analysis indicators. My own domain knowledge tells me that some of these features are better than others for predicitive ...
0
votes
0answers
22 views

T-SNE good clustering but SVM classification poor

I am trying to classify in 4 different classes, paragraph embedding vector computed with doc2vec using an non-linear svm over them. When I visualize the embeddings using tensorboard t-sne I can see ...
0
votes
1answer
46 views

Machine Learning classification problem

I'm trying to do this classification problem, depicted in the following Figure. The task is to separate the blue elements from the red elements in a cartesian (x,y) coordinate system. I have to: ● ...
2
votes
2answers
69 views

Logistic Regression vs SVM

Following Andrew Ng's machine learning course, he explains how we can modify logistic regression to obtain SVM algorithm. First he replaces (sort of approximating) cross entropy loss with hinge loss ...
1
vote
1answer
23 views

In an SVM, does a more negative/positive decision score mean that it is further from the seperating hyperplane?

For example, if I have a sample with a decision score of -6 and another with a score of -3, which sample is closer to the hyperplane? Also, does the probability of a sample belonging to a class ...
0
votes
1answer
22 views

Support Vector Machine (SVM) for classification problem based on Earth Mover's Distance (EMD)

I would like to run SVM for my classification problem using the Earth Mover's Distance (EMD) as a distance measurement. As I understood the documentation for Python scikit-learn (https://scikit-learn....
-1
votes
2answers
57 views

Plotting ROC & AUC for SVM algorithm

Towards , the end of my program, I have the following code. model = svm.OneClassSVM(nu=nu, kernel='rbf', gamma=0.00001) model.fit(train_data) Output ...
2
votes
2answers
61 views

Many separation line using RBF kernel in SVM

Below is my code, it take a range of a number, creates a new column label that contains either -1 or 1. In case the number is ...
1
vote
1answer
56 views

Reformulating the maximal margin classifier optimization problem

Ok, so I've been trying to read up on how SVM's work and started with maximal margin classifiers. At page $132$ in ESL (Elements of Statistical Learning) the authors "reformulates" the optimization ...
3
votes
2answers
76 views

What is done first, cross validation or grid search?

When I have the data set to train a model with SVM, which procedure is performed first, cross validation or grid search? I have read this in a couple of books but I don't know in what order all this ...
0
votes
0answers
12 views

LibLinear Parameter optimization

I want to use LibLinear to learn a model from 500,000 training samples (equally distributed over 8 classes) and test on 1,300,000 samples. The data set contains around 60 standardized features. In ...
0
votes
1answer
25 views

SVM SVC: Metric for parameter optimization on imbalanced data

I trained a multiclass SVC with RBF kernel on a down-sampled (and therefore balanced) dataset. Now I want to perform grid search to find best cost and gamma. What performance metric should I optimize ...
2
votes
0answers
15 views

Connection between prob output LogisticReg/SVM and ROC

I have the following ROC generated using LPOCV and Logistic regression or SVM (l2 norm). Now, let's say I have a test set containing 10 patients and I get that the probabilities of those patients to ...
1
vote
2answers
35 views

If a categorical feature only occurs a few times in a data set, should I drop it?

I have a data set of mostly categorical variables. When I one-hot encoded them some of the features occur less than 3% of the time. For instance the Tech-support feature only occurs 928 times in a ...
1
vote
1answer
107 views

Difference between SVM and GD/SGD?

My colleague mentioned that a data science project is using SGD classifier. So I started reading about GD/SGD and came across a nice article about Text classification using SVM and GD. In the end of ...
0
votes
0answers
74 views

Keras : How to Connect CNN ResNet50 with svm/random forest classifier?

I want to classify multiclass (10 classes) images with random forest and SVM classifier, that is, make a hybrid model with ResNet+SVM , ResNet+random forest. My ResNet code is below: ...
2
votes
1answer
162 views

Linear Discriminant Analysis (LDA) before or after k-fold cross-validation?

I have features extracted from a small dataset, would like to reduce the dimensions by using LDA. Also want to do a SVM classification with k-fold cross-validation. My question is: What would be the ...
3
votes
1answer
269 views

difference between empirical risk minimization and structural risk minimization?

I understand the meaning of empirical risk minimization as separate topic and was reading about structural risk minimization, it is hard for me to understand the difference between these two. I read ...
1
vote
0answers
26 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 ...

1
2 3 4 5
9