Questions tagged [libsvm]

LIBSVM is a library for support vector classification (SVM) and regression. It was created by Chih-Chung Chang and Chih-Jen Lin in 2001.

16 questions
17
votes
2 answers

Use liblinear on big data for semantic analysis

I use Libsvm to train data and predict classification on semantic analysis problem. But it has a performance issue on large-scale data, because semantic analysis concerns n-dimension problem. Last year, Liblinear was release, and it can solve…
Puffin GDI
  • 283
  • 3
  • 15
4
votes
1 answer

What is the difference between Linear SVM and SVM with linear kernel?

I'm wondering whether there is a difference between Linear SVM and SVM with a linear kernel. Or is a linear SVM just a SVM with a linear kernel? If so, what is the difference between the two variables linear_svm and linear_kernel in the following…
Joseph
  • 225
  • 3
  • 6
3
votes
1 answer

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 - \xi_{i} $$ $$ \xi_{i} \geq 0 $$ $$ C_{i} =…
cem
  • 33
  • 5
3
votes
1 answer

Convert Pandas Dataframe with mixed datatypes to LibSVM format

I have a pandas data frame with about Million rows and 3 columns. The columns are of 3 different datatypes. NumberOfFollowers is of a numerical datatype, UserName is of a categorical data type, Embeddings is of categorical-set type. df: Index …
learner
  • 359
  • 1
  • 11
2
votes
1 answer

Why Liblinear performs drastically better than libsvm linear kernel?

l have a dataset of dim=(200,2000) 200 examples and 2000 features. l have 10 classes. l used sklearn for both cases : svm.svc(kernel=linear) LinearSVC() However LinearSVC() performs drastically better than svm with linear kernel. 60% against…
Joseph
  • 225
  • 3
  • 6
1
vote
0 answers

$\chi^{2}$ kernel SVM performance issue

I am using $\chi^{2}$ kernel for non-linear SVM (using libSVM) for classifying MNIST digits. I am getting very bad performance (worse than random guessing). The $\chi^{2}$ kernel code (in MATLAB) is as follows: function D =…
SHASHANK GUPTA
  • 3,745
  • 4
  • 18
  • 26
1
vote
2 answers

Prepare data for SVM, Is it valid to normalise the data before and after PCA dimension reduction

Is it valid to normalise a dataset, reduce dimensionality with PCA and then to normalise the reduced dimension data. Assuming this is performed on training data, should the same PCA coefficients be used to reduce the dimension of the test data. …
1
vote
0 answers

Practical examples/tutorials of using One-Class Support Vector Machines

I am a newbie in machine learning, and hope to solve an anomaly detection task using One-Class Support Vector Machines (OCSVM). Despite the availability of several general introductions, definitions and academic papers on OCSVM, I do not find…
SyCode
  • 121
  • 4
1
vote
0 answers

Obtain standard deviation for libsvm

I have the following code for Grid search, but it only return the accuracy result using 5 folds cross-validation. Is it possible to obtain standard deviation from the 5 folds CV. How would you do that? Thanks in advance. for i=1:numLog2c log2c =…
Rapry
  • 21
  • 4
1
vote
0 answers

How to normalize(or other) the audio data so that the same labels with the similar characteristics from different records?

I am trying to detect swallows from recordings taken from hospital. I manually labelled the recordings on the Praat. Now the valid labels are silence, swallows and nonswallows(noise, enviromenment noise etc.) After I construct my dataset and train…
0
votes
1 answer

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 for? I have a highly imbalanced test set. There…
Big M
  • 55
  • 4
0
votes
2 answers

Understanding text conversion into SVM input

In Support Vector Machines, when used for sentiment analysis, text gets converted into a set of data points. How does this happen, usually?
0
votes
1 answer

Linear SVM in matlab and python giving different results

I have a particular dataset on which I am getting different results when using a linear SVM in matlab and sklearn toolbox. The data has been normalized in matlab and imported into python from a mat file. The codes used in Matlab is acc = 0; for i =…
APaul31
  • 21
  • 5
0
votes
2 answers

Is standardization needed before using scikit-learn SVM?

I am using the SVM function provided by scikit-learn. I would like to know whether I need to perform standardization before fitting the model. As I know, LibSVM tends to require pre-processing the data. I am not sure whether scikit-learn…
user297850
  • 253
  • 1
  • 3
  • 8
0
votes
0 answers

Sklearn SVM slower than when run in GridSearchCV

Problem: Running SVM in GridSearchCV is faster than running without it and supplying only 1 value of C and no CV. The AUC on the test set is lower when SVM is run outside of GridSearchCV. Background: I am trying to run an SVM classifier. Some…
1
2