Questions tagged [libsvm]

LIBSVM is an integrated software library for support vector machines, performing support vector classification, (C-SVC, nu-SVC), regression (epsilon-SVR, nu-SVR) and distribution estimation (one-class SVM)

Filter by
Sorted by
Tagged with
1 vote
0 answers
138 views

How can I make sense of alpha values obtained from scikit-learn OC-SVM?

I am building a ML model that uses the OC-SVM for anomaly detection. For our cost function we require the alphas obtained from the OC-SVM. We use the OC-SVM of scikit-learn, which I assume is based on ...
1 vote
1 answer
32 views

Learning-Agnostic Evaluation of SVM Models

I am at a point where I want to evaluate existing SVM models. For this task I assume I have: SVM model (to make it easier let's say it's a scikit-learn one) Training Dataset that was used to learn (1)...
  • 11
1 vote
0 answers
374 views

Code with explanation on using the OpenCV for image classification using the SVM with python from Scratch

Could anyone share links and resources on Image classification using SVM(Support Vector Machine) from Scratch? Also, there should be the use of the OpenCV library. I got one link, where I am trying to ...
  • 657
1 vote
0 answers
141 views

Adjusting the loss function for Support Vector Machines for SVC in sklearn

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 - ...
  • 11
2 votes
0 answers
249 views

How does the python port of libsvm's predict_proba work?

I've followed through the original libsvm code on it's [github][1]. I'm not concerned about the theoretical backfground of how the probability estimates are derived. All that I care about is how to ...
  • 121
0 votes
1 answer
94 views

Why do distances to hyperplane increase with more training samples in a One-Class SVM?

I am using a One-Class SVM from for anomaly detection. I observe that the distance of classified samples increases roughly proportional with the number of training samples. This is true for inliers ...
4 votes
0 answers
255 views

Does distance from the decision boundary suggest higher confidence that the class prediction is correct using SVM?

Does further distance from the decision boundary threshold suggest higher confidence that the class prediction is correct when using SVM with probability estimates enabled? This is not a question ...
  • 285
2 votes
1 answer
334 views

Which algorithm is implemented in sklearn's SVM method?

I'd like to know which exact version of svm is implemented in slearn. The references section on sklearn's svm page cites libsvm package and a paper from 1999 which is about comparing classification ...
3 votes
0 answers
215 views

SVM Scaling problem with One-Class SVM

I'm trying to mess around with a one-class SVM implementation I hacked together from ArduinoSVM. I'm using an RBF kernel and training the model with just "in" datapoints with sklearn. First, as is ...
  • 31
2 votes
1 answer
124 views

LibSVM - interpreting model output

I am using libSVM on a subset of the MNIST, and I am struggling to interpret the output. I have learned that rho is the bias term, and that sv_coef is the multiplier used to get to the weight term. ...
  • 123
1 vote
1 answer
2k views

What are the weights assigned to the features (coefficients in the primal problem) in SVR? [closed]

In case of linear kernel, how to interpret the weights in the formulations of nu-SVR? I am using nu-SVR to estimate the parameters in GARCH(1,1) model:$ \sigma_t^2 = \omega + \alpha y_{t-1}^2 + \beta\...
  • 13
3 votes
1 answer
139 views

Recover $\rho$ of $\nu$-SVM from e1071 package in R

Given a dataset $\{(x_i,y_i)\}_{i=1}^n$, the primal problem for $\nu$-SVM is: \begin{align} &\min_{w,b,\xi,\rho} && \frac{1}{2}w^\top w-\nu\rho+\frac{1}{n}\sum_{i=1}^n\xi_i\\ &\text{...
  • 3,070
2 votes
1 answer
67 views

Why setting SVDD's C-parameter to $> 1$ does not affect the result?

Why setting $C>1$ does not affect the result (compared to $C=1$) according to: https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/#libsvm_for_svdd_and_finding_the_smallest_sphere_containing_all_data ...
  • 955
1 vote
0 answers
154 views

Range of Search Space for the hyperparameters of Support Vector Regresssion (SVR)

I need to know "what should be the practical range of c, gamma and epsilon hyper-parameters during grid search optimization in SVR". The range of dependent variable lies between 1 to 300 with mean ...
1 vote
1 answer
817 views

How to perform kFold cross validation in Libsvm's precomputed kernel in MATLAB?

I understand that Libsvm provides 'v 10' option for 10-fold cross-validation in...
0 votes
1 answer
68 views

Formatting 3d data for LIBSVM

I am going to use LIBSVM for classification of data that uses a 'feature window'. Currently my data is in the form of a M x N x 3 matrix - M instances, N features and for each feature I'm considering ...
5 votes
1 answer
133 views

soft SVM - degenerate case

According to "A Note on Support Vector Machine Degeneracy", Theorem 4, if the dual problem for soft-SVM has a solution with $\alpha_i \in \{0,C\}, \forall i$, then $w=0$ for the primal problem. In "...
  • 1,037
0 votes
1 answer
56 views

SVM decision non linear

As I understand, to perform a decision in a non linear case (using a kernel) I use the following: $f(x) = sgn(\sum_{i=1}^{n} y_{i} \alpha_{i} \boldsymbol{k}(x,x_{i})+b)$ Where i=1,..n are the ...
  • 83
2 votes
2 answers
16k views

What is the parameter sigma in svm?

What is the influence of the sigma or gamma parameter for the rbf kernel? if possible a graph for a better understanding Is epsilon also known as SIGMA?
  • 167
4 votes
1 answer
7k views

What is the parameter nu in oneClass svm?

According to this link, nu specifies the nu parameter for the one-class SVM model. The nu parameter is both a lower bound for the number of samples that are support vectors and an upper bound for the ...
  • 167
2 votes
2 answers
232 views

I have 20000 potential features but only 200 instances, how can I do feature selection for an SVM classifier?

I have 20,000 potential features, but only 200 instances, how can I do feature selection for an SVM classifier, especially LIBSVM? Is there any fast way to do it rather than brute force? Since, ...
  • 285
2 votes
0 answers
37 views

For model selection, using n-fold cross-validation, should performance be averaged over the folds or calculated based on all predictions?

In $n$-fold inner-cross-validation, for model selection, should performance be calculated $n$ times and then averaged, or should all predictions be made covering the whole training set, and then ...
  • 285
0 votes
0 answers
148 views

Why SVM classifier generates bad results with LDA in Classification of audio data?

I am using SVM classifier to classify my audio data (instrument strokes). I am using LDA as a feature reduction technique to reduce feature dimensions. After applying classifier the results I am ...
  • 123
3 votes
1 answer
6k views

What Are Shrinking Heuristics

I have been working on a project with LibSVM and have noticed there is an option to train the SVM model with "shrinking heuristics" which are used to speed up the classifier training. After doing ...
  • 133
-1 votes
1 answer
53 views

Prepare data for previously trained LibSVM classifier

I trained a LibSVM classifier, with scaled features in the interval $[-1;1]$ with this equation: $$x'=2\frac{x-\min x}{\max x - \min x}-1$$ I am happy with the trained model and its accuracy on the ...
  • 133
0 votes
0 answers
112 views

One-class svm with given true positive rate

Is it always possible to find a one-class SVM with given true positive rate (TPR)? I used 1-D grid search with cross-validation to find the width parameter of RBF kernel with .90 TPR. The closest ...
  • 955
2 votes
2 answers
5k views

(SVM) Difference between linear kernel and polynomial kernel of degree 1?

I am new to machine learning. Could anyone tell me the difference between linear kernel vs. polynomial kernel of degree 1 wrt SVM (if there is any difference)? The reason I asked, I am getting ...
1 vote
0 answers
381 views

Augmenting feature vector with bias in SVM: effect on kernel matrix

It is easier to optimise a SVM without an offset term $b$ since we get rid of one of the linear constraints in the dual formulation. If an offset is still needed, it has been suggested that the ...
  • 177
7 votes
0 answers
245 views

Optimising dual SVM: why do some authors drop constraints? [duplicate]

In Hastie's Elements of Statistical Learning the dual problem is put as $$ \begin{align} \text{arg min}_\alpha \quad &\ \frac{1}{2}\alpha^\top Q\, \alpha_i- \sum_i \alpha_i\\ \text{subject to}\...
  • 177
3 votes
1 answer
360 views

Most widely accepted method of SVM model validation?

I am building an SVM based classifier (libsvm) for two distinct balanced classes which are non-linear but separable with an RBF kernel. Both classes have 175 instances each, which must be utilized ...
  • 285
0 votes
1 answer
619 views

what's the more common name of "Three-way data splits"?

I'm using Libsvm to train the model but the result is always not so good. now I'm reading this lecture's document: http://research.cs.tamu.edu/prism/lectures/iss/iss_l13.pdf the lecture mentioned "...
-1 votes
1 answer
916 views

How to use svm for a large dataset to predict

I am using svm method for prediction of wind power using windspeed. I have a large historical dataset containing timestamp, wind speed and wind power of size 6.74MB. it is a one year data at each 5 ...
0 votes
1 answer
930 views

How to apply SVM model to new data using libsvm in MATLAB?

Suppose that I have trained and tested an SVM classifier with the following code: ...
4 votes
2 answers
9k views

Can someone explain the RBF Kernel to me?

I have read every explanation out there on this but nobody seems capable of explaining this in a way that I am able to understand. For an SVM RBF Kernel we often say that: But what does x and x' ...
  • 143
0 votes
1 answer
72 views

Why is MSE difference between LIBSVM and my codes?

Now I used LIBSVM toolbox to solve a regression problem. However, I found a question that the value of MSE calculated by the toolbox was different with the value of MSE calculated by myself. Did you ...
1 vote
1 answer
139 views

bias in SVM in a balanced set - effect of sample size?

I have a dataset with many subjects, and for each subject I have 100 samples for an X variable, while Y has exactly 50%/50% cases for label 1/2. I am trying to run cross-validation with SVM and found ...
0 votes
1 answer
142 views

Does LibSVM output a broken SVM in epsilon-svr mode?

I run epsilon-svr on about 1000 samples (RBF kernel), and then calculate the in-sample training errors. The hyperparameters are found via a search, ranging from 1e-5 to 1e2. model->eps is a couple ...
1 vote
1 answer
619 views

Svm-scaling for training and testing using libsvm on matlab [closed]

I want to use SVM-scale for both training and testing on Matlab using libsvm. In libsvm document implement this but using Python and I need for Matlab. how can I do it?
  • 11
0 votes
1 answer
906 views

Why all "nBSV"s are zero in LIBSVM classification outputs?

I'm training a classification SVM for a binary classification model with 20 features (LIBSVM). These are some reports of my model (with different combination of features). Why all ...
  • 3,791
0 votes
1 answer
245 views

Do input features need to be in a distribution?

I am currently starting my machine learning project on binary classification and I have been taught that input data features should be in a distribution (although the distribution type itself need not ...
  • 21
-1 votes
1 answer
105 views

Odd Behavior in Cutoff of Soft Margin SVM

In soft margin svm, we solve the following quadratic programming problem. $$ \text{maximize}\ \sum_{i=1}^N \alpha_i-\sum_{i=1}^N\sum_{j=1}^N\alpha_i\alpha_jy_iy_jX_i^tX_j,\\ \text{subject to}\ \sum_{i=...
  • 339
1 vote
0 answers
1k views

Standardizing vs Normalizing data for Support Vector Machines

I am fairly new to the topic of Support Vector Machines, and despite my readings, I still encounter difficulties in understanding the following: why do some people address the need to normalize data ...
1 vote
0 answers
179 views

Below chance classification after regressing out class-specific signal

I have a signal X that depends on parameters Y (condition) and S (participant). I'm interested in classifying Y based on X, but a) the YxS contingency table of numbers of observations per Y and S ...
  • 273
1 vote
0 answers
187 views

Am I correct for cross-validation or validation set in libSVM?

I used libSVM in MATLAB to find whether there is some relationship between the features and label. My steps are: Divide the dataset in 60% for training, 20% for testing and 20% for validation. I used ...
3 votes
2 answers
2k views

Do SVM suffer from imbalanced class sizes?

Say I have a population with classes c1 and c2 where size(c1) >> size(c2) Does the SVM suffer from imbalanced classes sizes where I need to manually correct the training procedure?
  • 1,575
1 vote
0 answers
292 views

How to use Probability (-b1) for one-class classification using LibSVM?

I need some information concerning the LibSVM one-class classification. I use -b1 for two-class classification in SvmTrain and my outputs are prob values and prob labels. I want to use the similar ...
0 votes
1 answer
1k views

How to train an SVR model? [closed]

I'm trying to figure out how SVR works, as I need to use it to model some time series. For this purpose, before starting with this model, I've tried to create a toy-model from a sinusoidal function, ...
1 vote
1 answer
787 views

Training a Support Vector Machine classifier on a satellite image using python

I am new to the concept of supervised classification technique. I am trying to use an SVM classifier for classifying Sea Ice types in the Arctic using satellite image. All the tutorials I have read ...
  • 13
0 votes
1 answer
281 views

One-to-rest Weight vectors in one-to-one multiclass SVC

I'm attempting to generate some one-to-rest weight vectors for a multi-class SVC for feature selection purposes. However, I'm current using one of the several LibSVM ports, which inherently performs ...
-1 votes
1 answer
180 views

Using LibSVM for One-Class-Classification

Why do the same instances, in training and testing, get classified as unknown in LibSVM? I'm using the linear kernel function nu=0.1, gamma=0.1 Here is the instance that is in both the training and ...

1
2 3 4 5