Questions tagged [svm]
Support Vector Machines (SVM) are a popular supervised machine learning algorithm that can be used for classification or regression.
579
questions
0
votes
1
answer
10
views
Using a SVM to classify audio data
If I had 1000 audio files where three people are independently saying an animal at the same time, there can be 9 independent labels of animals. What features should I select from the audio file, and ...
0
votes
0
answers
6
views
SVM kernel for detecting if a substring appears in some given string
I'm trying to do the exercise in 16.1 in the book Understanding Machine Learning, Ben-David, et al. formulated as follows:
Consider the task of learning to find a sequence of characters
("...
1
vote
2
answers
79
views
Does it make sense to train data in scikit-learn and copy+paste parameters into Rust's linfa?
I have a situation where my data can only be read from in a hosted Python environment, due to data security reasons. However, I am constrained to run ML models in a Rust environment due to work-...
0
votes
2
answers
40
views
Is SVM is a good choice for large dataset?
With my limited knowledge of SVM, I am following a tutorial on YouTube to create an End-to-End multi-class ML model . There the person is using SVM on a dataset with 9 images dataset, but the dataset ...
0
votes
1
answer
35
views
How to use HOG for object detection without using SVM?
I am following the tutorial to calculate the HOG feature matrix. However, it does not tell how to find the object using the HOG matrix.
For example, I have an image of several pipes stacked together. ...
0
votes
1
answer
39
views
SVM: difference between soft and kernel technique
Most articles and textbooks say that soft margin SVM is used is the data is messy/not linearly separable. We introduce slack variables to make the data linearly separable. Kernels are used when the ...
0
votes
0
answers
19
views
Error in SVM classifier RBF kernel in MATLAB?
I had written MATLAB function for RBF kernel in SVM classification but I am getting the following error:
Kernel function returns kernel product of incorrect size.
...
0
votes
0
answers
11
views
Model outputting repeated result in Flask back-end
I am trying to implement this working audio classification model into a Flask app for use on a website. However, anytime I upload an audio file, even one that was used on the test/training of the ...
0
votes
0
answers
31
views
An OCR model that can be easily improved on the user side
I am building OCR software, for this purpose I trained a model on many types of fonts, the model is SVM or NN but it is not ...
0
votes
1
answer
58
views
Is it ok to normalize data using minmaxscalar on dependent variable?
I'm trying to make a sales prediction using the column X = item_amount and y = item_price_total, I'm confused whether it's okay to normalize data on the dependent variable using minmaxscalar?
With the ...
0
votes
0
answers
9
views
Correlation between hinge loss function, Langrage function and ai
The function $f(w,b) = \frac{1}{2} ||w||^2$ is our objective function while our constraints are all the correct classifications of the data points expressed as $g(w,b) = \sum_{i=1}^{l} (y_i (x_i \cdot ...
0
votes
0
answers
55
views
How to use multiple inputs for a multiclass classification problem using an SVM
I'm following along the guide on this website:
https://towardsdatascience.com/machine-learning-nlp-text-classification-using-scikit-learn-python-and-nltk-c52b92a7c73a
And I managed to make it work for ...
0
votes
0
answers
43
views
Issues with sklearn.svm.SVC
I am trying to use the sklearn.svm.SVC on a relatively big dataset, 1.5k test/train samples, 512 features each, one sample per class (so, 1.5k classes). I know that SVC doesn't scale well, so at first ...
0
votes
0
answers
12
views
Can the addition of a non-support vector change the SVM solution?
If I understand the math behind the classic SVM for non-separable data correctly, the addition of a non-support vector (non-SV) should theoretically not alter the solution. My reasoning is that since ...
0
votes
0
answers
8
views
Multiple One-Class SVMs for Multiclass Classification with an additional "Unknown" Class
I am in a sound event classification setting, using a traditional SVM model on acoustic indicators calculated from raw audio.
I have 3 classes I want to be able to identify, say A, B and C, but also a ...
0
votes
0
answers
13
views
Output of SVM changes depending on sign of classes
I want to train a non-linear SVM with a dataset like this:
In the purple samples, y = -1. In the yellow ones, y = 1.
Then, I'm ...
0
votes
0
answers
82
views
the number of class has to be greater than 1 when fitting SVM
I am trying to fit a model using SVM with the Adversarial Robustness Toolbox classifier estimator, but i receive the following error when i try to fit it.
...
1
vote
0
answers
26
views
SVM, Is the slack value always equal to the alpha value for points within the margin?
I'm preparing for an exam and I got stuck on this question.
I understand that the alpha values 'affects' how much influence corresponding data point has on the position of the decision boundary, and ...
0
votes
0
answers
23
views
How do you implement the dual form of the soft-margin SVM in MATLAB using quadprog?
I'm having trouble trying to implement the primal and dual forms of the soft-margin SVM in MATLAB.
For a soft-margin SVM defined as $$\underset{\mathbf{w},b,\mathcal{E}_{i}}{min}\ \lambda||\mathbf{w}^...
0
votes
0
answers
40
views
Is the transformation implied by a positive-type kernel well-defined?
I’ve been trying to get my head around the particularity of the Hilbert space that a positive-type (equiv. positive definite) kernel represents an inner product on, and was hoping for some help in ...
0
votes
1
answer
48
views
Classification of a noisy data
What method can be used to classify data in the following example?
There is a table (hundreds of strings and hundreds of columns). Several columns in this table uniquely allow you to classify each row:...
0
votes
0
answers
34
views
Intuition behind replacing constraint in equation for Optimal Separating Hyperplane
I am reading "Optimal Separating Hyperplane" section of the book - Elements of Statistical Learning which is described on page 132 as follows:
My questions:
The constraint $||\beta|| = 1$ ...
1
vote
1
answer
54
views
Why, considering duale form, Soft Margin SVM is more general than Hard Margin (linear kernel)
I have a problem understanding why, considering dual form, the Soft margin SVM (linear) is more general than Hard margin SVM. The dual form of the Hard Margin consists of the finding of tuple $\alpha$ ...
0
votes
1
answer
18
views
estimating coordinate correction
I'm working with 3d coordinate data (x,y,z), however I know that the z coordinate is systematically wrong and the error of z is dependant on both x and y. I however do have some data where I know the ...
0
votes
0
answers
49
views
Is SVM rotation invariant?
Let's say we have some data X and we want to find a linear separator using soft SVM with l2 regularization, and then we want to solve the same problem after applying some rotation matrix Q to the data ...
0
votes
0
answers
17
views
Hard SVM, scaling margin with scalar
I've recently encountered the following claim: If an Hard SVM has one optimal solution over a linearly separable dataset, then it has a solution for any margin x>0.
Meaning, if the inequation holds ...
1
vote
0
answers
90
views
What is ROC curve based on for SVM?
I was studying about the ROC curves for Logistic regression. There is a threshold in this method that determines the classification. By changing this threshold we get different confusion matrices and ...
1
vote
0
answers
12
views
Boosting the effect of some of the features in SVM
I'm doing text classification with SVM. I'm using Tfidf vectorization. In addition to the text vectors, I have a context data denoting the possible outcomes of the prediction. For example, I have a ...
0
votes
1
answer
45
views
Is Linear kernel SVM always better than Logistic regression?
We know that linear kernel SVM may give better results than logistic regression since maximizing the margin usually leads to more stable results/better displacement of the decision boundary. But is ...
0
votes
0
answers
36
views
Which combination would be more beneficial : Resnet-50 and SVM or Resnet-18 and GANs?
I'm trying to compare the two methods that were used for COVID-19 detection.
Given that both these methods have approximately the same accuracies
which method according to you would be more beneficial(...
2
votes
1
answer
2k
views
Is it sensible to use the ROC curve with an KNN model? And if so why?
I am a beginner doing my first ML project. I am doing a binary supervised classification on an unbalanced dataset and want to use the ROC curve as a performance metric of my models. I am using ...
2
votes
2
answers
1k
views
Grid_search (RandomizedSearchCV) extremely slow with SVM (SVC)
I'm testing hyperparameters for an SVM, however, when I resort to Gridsearch or RandomizedSearchCV, I haven't been able to get a resolution, because the processing time is exceeding hours.
My dataset ...
3
votes
0
answers
55
views
Force positive coefficients for Logistic Regression and LinearSVC
Do you know what is the best way to force positive coefficients with Logistic Regression and Linear SVC using scikit learn?
for instance
...
0
votes
0
answers
24
views
What input does SVM consider when doing the text classification?
I was using SVM for text classification
pipe_lr1 = Pipeline(steps=[('cv',TfidfVectorizer()),
('lr_multi',MultiOutputClassifier(LinearSVC()))])
...
0
votes
1
answer
73
views
How to get model equation/coefficients for SVM in Orange
I have dataset and want to train an SVM model, I have done so in Orange, and the model behaves good, I used the File -> SVM -> 'test and score' widgets, now I want to take that linear model and ...
0
votes
1
answer
120
views
How do I print data after fitting data into a pipeline?
I was using 3 functions form scipy: TFIDF vectorizer, Multioutput classifier and Linear SVC.
The code goes like this.
...
0
votes
1
answer
48
views
SVM produces a constant accuracy when testing with development set, regardless of features
I am currently doing a class project to use a machine learning algorithm (SVM or Regression) to deduce whether two sentences are paraphrases of one another. We were given training, development, and ...
0
votes
1
answer
28
views
Is it possible to train a Support Vector Machine to a specific accuracy?
From my understanding, support vector machines run on the premise of minimizing some error function, usually with the goal of maximizing accuracy overall. However, there are a lot of contexts, ...
1
vote
1
answer
34
views
Can we train of a binary classifier with "A" to classify "a"?
I have a maybe naive question about the appropriateness of using binary classifications. This is a hypothetical example, so forgive me if it is too coarse.
Let's say I want to train a support vector ...
0
votes
1
answer
31
views
what happens when test data has an instance on the hyperplane. How SVC() classifies it?
What happens when test data has an instance on the hyperplane? How does SVC() of scikit-learn classify it?
3
votes
1
answer
146
views
Official page of Weka for SVM java code
I am using Weka to train a model from few days. I know Weka use Java code to implement a classifier. I also heard that Weka has some github pages to describe the java code for the classifiers. I like ...
0
votes
1
answer
41
views
Finding points in 3D space - SVM
In the SVM classification, we use planes to classify the labels points if the dataset has 3 input features. We need to use planes when input features are 3. I am describing a toy dataset with 3 input ...
0
votes
1
answer
91
views
Which line need to consider when try to separate two class given a feature set in SVM
Suppose I have a toy dataset like following
...
0
votes
1
answer
31
views
Proof of perpendicular distance of an observation from the Maximal Margin Hyperplane
I was reading about Maximal Margin Classifiers in "Introduction to Statistical Learning" and could not understand how is the perpendicular distance of an observation (which is a vector) from ...
1
vote
1
answer
56
views
working principle of Support Vector Machine
I have a dataset consisting of numerical features and categorical features. I want train the training set using SVM. SVM is a quadratic optimization algorithm. I would like to know the how SVM works ...
2
votes
0
answers
79
views
Feature selection and model performance
Featuretools provides an automated way to generate features from your data, by providing relationships within your data and applying their so-called deep feature synthesis. It generates features like ...
2
votes
1
answer
78
views
memory bound for kernel tricks in machine learning
Based on Andrew Ng's lecture on Kernel,
you use training samples (referred as landmarks l) and use them during prediction to construct the higher dimensional representation of the given sample.
This ...
1
vote
1
answer
90
views
My model is predicting values for only two labels (instead of 9) how to fix it?
My goal is to predict the count (variable y) based on various features (variable x). My y is most of the time (98.4%) equal to 0, so this data is inflated by 0.
Based on this premise, I thought that ...
1
vote
0
answers
8
views
Precision and AUROC for which class values
I am a newbie in reading research paper and implementing it by myself. I went through the paper Breast Cancer Survival Prediction from Imbalanced Dataset with Machine Learning Algorithms.
Can anyone ...
0
votes
1
answer
117
views
How to increase the accuracy of 1 class
Hai I am working with blood transfusion data set using SVM classifier.I applied SVC with C=17 and kernel rbf. It is highly imbalanced data set and I balanced it using SMOTE. But class 1 is performing ...