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
-2
votes
1answer
21 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 ...
0
votes
0answers
28 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
29 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
33 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
27 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
37 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
28 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
19 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
35 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
38 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
32 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
62 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
17 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 ...
1
vote
1answer
47 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
27 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
123 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
16 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
21 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
69 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
35 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
49 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
8 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
6 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
26 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
137 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
56 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
68 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
19 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
40 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
41 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
19 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
33 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
25 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
12 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
31 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
48 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
25 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
49 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
23 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
21 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
173 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
15 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
29 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
48 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
63 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
24 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 ...

1
2 3 4 5
9