Questions tagged [libsvm]

LIBSVM is a library for Support Vector Machines

LIBSVM is an integrated software for support vector classification, (C-SVC, nu-SVC), regression (epsilon-SVR, nu-SVR) and distribution estimation (one-class SVM). It supports multi-class classification. It comprises of both C++ and Java sources, and interfaces to several commonly used languages, such as Python, MATLAB, R, Ruby, Perl, PHP and Haskell.

1241 questions
9
votes
1 answer

Different accuracies across different svm libraries with same parameters on same data

I am using libsvm and I did a very simple experiment, training 10k vectors and testing with only 22. I am using the linear kernel with parameter cost C=1. My problem is multiclass. So Libsvm will use the one-versus-one approach to classify my…
mad
  • 2,677
  • 8
  • 35
  • 78
9
votes
1 answer

libsvm (C++) Always Outputting Same Prediction

I have implemented an OpenCV/C++ wrapper for libsvm. When doing a grid-search for SVM parameters (RBF kernel), the prediction always returns the same label. I have created artificial data sets which have very easily separable data (and tried…
trianta2
  • 3,952
  • 5
  • 36
  • 52
9
votes
7 answers

How to Setup LIBSVM for Python

I built libsvm on Mac OS X with Make. $ tar xzfv libsvm-3.17.tar.gz $ cd libsvm-3.17 $ make This built the various libsvm binaries: $ ls COPYRIGHT heart_scale svm-predict.c svm-train.c tools FAQ.html java svm-scale …
David Williams
  • 8,388
  • 23
  • 83
  • 171
9
votes
2 answers

How to run libsvm in MATLAB?

How to get started with libsvm under MATLAB? I've downloaded the library, and extracted it in C:\Program Files\MATLAB\R2012a\toolbox\, but then I don't know how to use it in MATLAB.
user2157806
  • 319
  • 2
  • 8
  • 17
8
votes
1 answer

How to extract info from scikits.learn classifier to then use in C code

I have trained a bunch of RBF SVMs using scikits.learn in Python and then Pickled the results. These are for image processing tasks and one thing I want to do for testing is run each classifier on every pixel of some test images. That is, extract…
ely
  • 74,674
  • 34
  • 147
  • 228
8
votes
1 answer

Some doubts modelling some features for the libsvm/scikit-learn library in python

I have scraped a lot of ebay titles like this one: Apple iPhone 5 White 16GB Dual-Core and I have manually tagged all of them in this way B M C S NA where B=Brand (Apple) M=Model (iPhone 5) C=Color (White) S=Size (Size) NA=Not Assigned (Dual…
Usi Usi
  • 2,967
  • 5
  • 38
  • 69
8
votes
4 answers

SVM Visualization in MATLAB

How do I visualize the SVM classification once I perform SVM training in Matlab? So far, I have only trained the SVM with: % Labels are -1 or 1 groundTruth = Ytrain; d = xtrain; model = svmtrain(groundTruth, d);
djpark121
  • 1,191
  • 3
  • 10
  • 5
8
votes
1 answer

scikit learn svc coef0 parameter range

Documentation here. I'm wondering how important the coef0 parameter is for SVCs under the polynomial and sigmoid kernels. As I understand it, it is the intercept term, just a constant as in linear regression to offset the function from zero.…
lollercoaster
  • 15,969
  • 35
  • 115
  • 173
7
votes
1 answer

Suppress C warning messages in R

I am calling an R function from the R package e1071 which is interfaced with libsvm (a C program). This function is passing C (printf) warning messages to the R console. I know this because the warning messages are of the form (warning:...) whereas…
Michael
  • 7,087
  • 21
  • 52
  • 81
7
votes
4 answers

Which is a better method? libsvm or svmclassify?

I have been recently trying to use svm for feature classification. While i was doing so, a question came to my mind. Which would be a better method to use, LIBSVM or svmclassify? What I mean by svmclassify is to use in-built functions in MATLAB such…
user999450
  • 249
  • 5
  • 14
7
votes
1 answer

Tutorial for libsvm c++

Looking for tutorials and/or sample code for libSVM's C++ interface. Specifically, I want to classify features extracted by using SIFT or SURF feature descriptors. I have tried looking on the website and did not find any such documentation/sample…
Mario
  • 1,469
  • 7
  • 29
  • 46
7
votes
1 answer

SVC vs LinearSVC in scikit learn: difference of loss function

According to this post, SVC and LinearSVC in scikit learn are very different. But when reading the official scikit learn documentation, it is not that clear. Especially for the loss functions, it seems that there is an equivalence: And this post…
John Smith
  • 1,604
  • 4
  • 18
  • 45
7
votes
2 answers

Classification score: SVM

I am using libsvm for multi-class classification. How can I attach classification scores, to compare the confidence of classification, with the output for a given sample as: Class 1: score1 Class 2: score2 Class 3: score3 Class 4: score4
Xolve
  • 22,298
  • 21
  • 77
  • 125
7
votes
1 answer

Using LIBSVM to predict authenticity of the user

I am planning on using LibSVM to predict user authenticity in web applications. (1) Collect Data on particular user behavior(eg. LogIn time, IP Address, Country etc.) (2) Use Collected Data to train an SVM (3) Use real time data to compare and…
ruwanego
  • 427
  • 2
  • 7
  • 18
7
votes
2 answers

libsvm predict method confusion

I have a question about the svm_predict() method in libsvm. The README has this quickstart example code: >>> y, x = [1,-1], [{1:1, 3:1}, {1:-1,3:-1}] >>> prob = svm_problem(y, x) >>> param = svm_parameter('-c 4 -b 1') >>> m = svm_train(prob,…
apexdodge
  • 6,657
  • 4
  • 26
  • 33