Questions tagged [svm]

Support Vector Machines (SVM) are a popular supervised machine learning algorithm that can be used for classification or regression.

158 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
2answers
1k views

How can I use two different datasets as a training model for svm

I know that you're supposed to scale your test data using the parameters (mean and stdev) from your training data. This is relatively simple; but what if the number of samples is limited in one ...
4
votes
2answers
223 views

Support Vector Regression trained with data sets

I am now searching for a long time on the internet and on papers for an answers of simple questions. Am I able to train a Support Vector Regression algorithm with different data sets? If yes, how is ...
4
votes
1answer
445 views

Illustrating the dimensionality reduction done by a classification or regression model

Tl;DR: You can predict something, but how do you explain the prediction? Your usual classification/regression setup Lets say the data is a classic regression/classification problem: several numerical ...
3
votes
0answers
1k views

why the accuracy of LDA model is always changing and also is high

Let’s explain the whole goal firstly, then go through the question. I am using topic modeling like LAtent Dirichlet Allocation and NMF to extract the topic from a collection of documents. My dataset ...
3
votes
0answers
1k views

Which algorithm is used in sklearn SGDClassifier when modified huber loss is used?

The documentation says: The loss function to be used. Defaults to ‘hinge’, which gives a linear SVM. The ‘log’ loss gives logistic regression, a probabilistic classifier. ‘modified_huber’ is ...
3
votes
0answers
223 views

feature weights in structured support vector machine

I like to find the weight vector for input-space features in a structured SVM. The idea is to identify the most important set of input-space features (based on the magnitude of their corresponding ...
2
votes
1answer
41 views

Should bag of words in training set include test set data when doing text classification?

I'm doing text classification to identify 'attacks' from Wikipedia comments using a simple bag of words model and a linear SVM classifier. Because of class imbalance, I'm using the F1 score as my ...
2
votes
2answers
91 views

One-Class classification

I am currently using an one class classification svm and I am trying to boost the classification results by employing more than one svm-occ with varying gamma parameters and combine these decisions ...
2
votes
0answers
53 views

Intuition behind One Class SVM (Scholkopf)

I am trying to understand the intuition behind the idea of finding a hyperplane that separates the training data from the origin in the feature space. Why separation from origin with a hyperplane ...
2
votes
0answers
19 views

Non semi positive definite kernel matrix

What happens if we run a support vector machine model using a kernel that does not satisfy requirements such as non-positive semi definite? This is my flow of thought: In kernel methods $w.x$ is ...
2
votes
0answers
39 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 ...
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 ...
2
votes
1answer
217 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
22 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 ...
2
votes
0answers
169 views

Why are the regions/decision boundaries overlapping with multi-class classification using SVM in sci-kit?

I am using the SVM in scikit-learn library for doing multiclass classification. I am wondering why these regions (decision boundaries) are overlapping (as seen in the picture below)? Could someone ...
2
votes
1answer
44 views

Version of Perceptron

If we change the $ywx<0$ condition (for performing update) to $ywx<1$ like in SVM (but without adding regularization to maximize the margin), is there any difference from the basic perceptron (...
2
votes
0answers
14 views

Confusion regarding prediction results of SVM and ANN on feature vectors

I am making a custom image classifier using Transfer Learning on Inception V3. I have 3 classes of images with ~6K images each. The input dimension of the network is 500X500 and the output of the ...
2
votes
1answer
54 views

Get how similarity between the training data and the income data?

I'am trying to use Clustering and Classification methods as SVM using scikitlearn. I'm also studying some outliers/novelty detections I want something like a semi-supervised model. I want to predict ...
2
votes
0answers
307 views

Sequence classification using oneClass SVM

In the code below, I'm using a sequence to sequence approach as a prediction model for anomaly detection. The data set I'm working with is ADFA-LD. The training phase is done using only normal ...
2
votes
1answer
158 views

Dataset where svm performance is significantly different from random forest

Is there a specific dataset where svm performs significantly better or worse than random forest? I know that the performance could depend on the dataset but is there a specific dataset?
2
votes
0answers
101 views

Structured Support Vector Machine (Joint Feature Map)

I'm studying Structured Support Vector Machine. (https://en.wikipedia.org/wiki/Structured_support_vector_machine) The theory's clear, but I need a tangible example to make everything more concrete. ...
2
votes
0answers
34 views

I have data of some movies and their subtitles.I want to classify them based on their ratings

I will convert the subtitles into vectors and use them as features to classify the movies into different categories based on their ratings.The problem that I am facing is my feature vector is much ...
2
votes
0answers
35 views

Solution of quadratic optimization in support vector machines

In support vector machines, the minimization problem with inequality constraints can be converted to a minimization problem of Lagrange multipliers with equality constraints by KKT condition and ...
2
votes
0answers
111 views

Non-linear Support Vector Regression issue - Sklearn Python 3.6

I am fairly new to Sklearn and machine learning and have encountered an issue when using SVR with an RBF kernel. Below is my predicted data compared directly with my real data: I do not know what I ...
2
votes
2answers
988 views

How can I find anomalies in each row of data?

I have some reported data I want to spot anomalies on. The columns are a facility name then monthly reports of that given facility. ...
2
votes
0answers
23 views

When should the bias b be updated with weights w and when should it be updated seperately?

It seems in some Machine Learning models, the bias term $b$ is updated just like other weights $w_i, i=1...n$. For example, in Logistic Regression, using SGD, $b \ \text{or} \ w_0$ is updated with: $$...
2
votes
0answers
169 views

How to create a global model with personalized features for multi-label classification problem

I'm trying to predict additional recipients of a message given the content of the message (like subject and body) and the current recipients of the message. for ex: I have 4 users in the system U1, ...
2
votes
0answers
100 views

What are some machine learning problems that can be attacked with continuous multiobjective optimization?

I am working on continuous vector optimization, and hence continuous multiobjective optimization is a particular case. I am interested in finding applications in machine learning for this problems. Is ...
2
votes
0answers
72 views

How to select samples for a trainings set

My dataset contains half a million unlabeled entries with over 100 binary features. A third of these features are present in less than 1000 samples. I want to classify a few samples by hand (into ...
2
votes
0answers
1k views

fitting classifier object of type 'int' has no len()

We have LDA topic modeling whose purpose is to generate a number of topics given a set of documents. So each document can belong to various topics. Also, we can evaluate the model we have created. one ...
2
votes
0answers
8k views

Found array with dim 3. Estimator expected <= 2

I am using LDA over a simple collection of documents. My goal is to extract topics, then use the extracted topics as features to evaluate my model. I decided to use multinomial SVM as the evaluator. ...
2
votes
0answers
111 views

How to mitigate the hierarchical error propagation in tree-structured classification

Suppose we have a multi-class classification problem, where the number of classes $K \geq 3$ We use a tree structure of multiple SVMs to divide and conquer the problem, with one example in the figure ...
2
votes
0answers
186 views

Non-linear transformations input dataset for support vector machines

I have two classes (A,B) that I would like to classify using a SVM. Say that I have a class C and a function f. Can I do this: ...
2
votes
2answers
81 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
0answers
4 views

What does it mean (non) convex "constraint"?

I was referring SVM section of Andrew Ng's course notes for Stanford CS229 Machine Learning course. On page 16, he says: SVM optimization problem can be given as follows: $$\begin{align} \max_{\...
1
vote
0answers
31 views

What is the best way to flatten my data to be used by an SVM algorithm?

I am trying to classify data from an 8 channel SEMG sensor (different gestures) by using an SVM. So far, I have managed to record the data and for each channel, I've calculated 7 appropriate features, ...
1
vote
0answers
78 views

Plotting SVM hyperplane margin

I'm trying to understand how to plot SVM hyperplane and its margins by this example: https://scikit-learn.org/stable/auto_examples/svm/plot_svm_margin.html And I got stuck at the plotting the ...
1
vote
0answers
30 views

Does linear kernel make SVM a linear model?

I have deleloped several SVR models for my case study using the linear kernel, and those models were optimized using the RMSE as criterion. Now Im searching for additional evaluation metrics and it ...
1
vote
0answers
29 views

One-class SVM formula

Recently I have been studying one-class SVM and am a little bit confused about the offset $\rho$. The common optimization problem is to find a function $f(x)= w^\top x-\rho$ by solving $$\begin{array}...
1
vote
1answer
41 views

Gaussian Kernel faster than Linear

I have a Dataset with 580 samples and 7 features. I compared the time between three kernels: Linear, Quadratic and Gaussian and using RandomizedSearchCV as the following: ...
1
vote
1answer
58 views

Implementing a weighted support vector machine in python

I have the following problem. The minimization problem of the SVM that I want to solve is: $$ \min_{w, b} \frac{1}{2}w^{T}w + \sum^{m}_{i=1}C_{i}xi_{i} $$ Subject to: $$ y_{i}(w^{T}x_{i} - b) \geq 1 - ...
1
vote
0answers
34 views

Interpreting one-class SVM

I am new to SVM (one-class) and was practically investigating it. Got some weird result that I can not explain. Let me demonstrate by some small reproducible code and visualization: ...
1
vote
0answers
19 views

Machine learning model (neural network or SVM) for unequal feature matrices size

I have feature matrices obtained from visual bags of words model for various dictionary sizes. Example, Nx5, Nx10, …., Nx15000. Where N is the number of samples and 5, 10, …15000 are the visual ...
1
vote
1answer
207 views

Bert and SVM classification

I'm trying to understand the concepts in the title and how they fit into the task of binary classification. According to my understanding so far, you can encode text using various feature-extraction ...
1
vote
0answers
21 views

SVM is margin determined by nearest datapoint or nearest datapoints?

I am studying support vector machines and different resources seem to define the margin differently. Some define the margin as 2 times the distance to the nearest datapoint. Others define the margin ...
1
vote
0answers
30 views

SVM with gradient descent

The constrained optimization problem in SVM is given by min 1/2 ||w||^2 s.t y(i)(w^T x(i) + b >= 1 for all i Now converting this to an unconstrained optimization problem gives the lagriangian L as ...
1
vote
0answers
153 views

SVM on BERT-Embeddings with very small dataset does not converge

I am trying to reproduce the results from this paper where they use a linear SVM on top of BERT-Embeddings for text-classification. They use the average of the token-embeddings which results in a 768 ...
1
vote
0answers
81 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 ...
1
vote
0answers
47 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
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 ...