Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7191179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:40:23+00:00 2026-05-28T19:40:23+00:00

I have a multiclass svm classification(6 class). I would like to classify it using

  • 0

I have a multiclass svm classification(6 class). I would like to classify it using LIBSVM. The following are the ones that i have tried and i have some questions regarding them.

Method1( one vs one):

model = svmtrain(TrainLabel, TrainVec, '-c 1 -g 0.00154 -b 0.9');
[predict_label, accuracy, dec_values] = svmpredict(TestLabel, TestVec, model);

Two questions about this method: 1) is that all i need to do for multiclass problem
2) what value should it be for n in ‘-b n’. I m not sure

Method 2( one vs rest):

u=unique(TrainLabel); 
N=length(u); 
if(N>2)    
    itr=1;    
    classes=0;   
    while((classes~=1)&&(itr<=length(u)))   
        c1=(TrainLabel==u(itr));    
        newClass=double(c1); 
        tst = double((TestLabel == itr));
        model = svmtrain(newClass, TrainVec, '-c 1 -g 0.00154');  
        [predict_label, accuracy, dec_values] = svmpredict(tst, TestVec, model);    
        itr=itr+1;   
    end
    itr=itr-1;
end

For the second method,how do I attach classification scores. I am not able to do voting.

Besides that,these are the two methods I have tried. Which method is better?

Would like to hear some comments. Please correct me if I am wrong.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T19:40:23+00:00Added an answer on May 28, 2026 at 7:40 pm

    Regarding the ‘-b’ parameter, in the LIBSVM README it says:

    -b probability_estimates: whether to train a SVC or SVR model for probability estimates, 0 or 1 (default 0)

    Therefore, you should specify ‘-b 1’ if you want the trained model to return class probabilities, and ‘-b 0’ if you don’t. You only need to call svmtrain once. Also, if you specify ‘-b 1’ for training, you must also specify it for prediction.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that LIBSVM only allows one-vs-one classification when it comes to multi-class SVM.
I am using PyML for SVM classification. However, I noticed that when I evaluate
I'm using PYML to construct a multiclass linear support vector machine (SVM). After training
We have some devices (Like IP cameras) on network. I am writing APIs in
I have some code that listens for announcements via UDP multicast. I can get
I have a homework to classify multi-class images with Support Vector Machines. I am
I have a class that has a multicast delegate: class Signaler { public delegate
I have the same server side application running on multiple machines. I would like
We have a publisher application that sends out data using multicast. The application is
I have a problem with a c++ socket. I'm using CAsyncSocket from MFC that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.