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

  • SEARCH
  • Home
  • 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 6534479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:15:21+00:00 2026-05-25T10:15:21+00:00

I am trying out Liblinear for linear SVM classification on some 2D points (I

  • 0

I am trying out Liblinear for linear SVM classification on some 2D points (I am using a simple python gui to add points for 2 classes and then draw the line that separates the classes), but even though I am using the bias option (-B 1) for training, I get a bias very close to zero (the separating line almost passes through the origin).

I also tried simply training the 2-point set:

-1 1:10 2:30
+1 1:10 2:80

but I still get a very small bias (a line passing through the origin instead of a horizontal line in the XY plane as I guess it should be). Here is my output vector w:

0.2003362041634111, 
-0.03465897160331861, 
0.0200336204163411 

What am I doing 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-25T10:15:21+00:00Added an answer on May 25, 2026 at 10:15 am

    I’m not sure you are doing anything wrong.

    From the liblinear FAQ:

    Q: Is LIBLINEAR gives the same result as LIBSVM with linear kernel?

    They should be very similar. However, sometimes the difference may not
    be small. Note that LIBLINEAR does not use the bias term b by default.
    If you observe very different results, try to set -B 1 for LIBLINEAR.
    This will add the bias term to the loss function as well as the
    regularization term (w^Tw + b^2). Then, results should be closer.

    This says that liblinear tries to make the bias term as small as possible. If it can set it to zero and still get good training-set accuracy then it will.

    There isn’t a particularly good reason to imagine that regularising the bias will provide a better classifier, so many other learning systems it does not enter into the regularisation term. However in ‘real-world’ problems with very high dimensionality it’s also very likely that the data are separable without needing a bias term, so regularising it does no harm and can be easier to implement.

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

Sidebar

Related Questions

For trying out some pointer stuff, I made an instance variable in an existing
Am trying out Ruby on Rails in Windows XP using the Hello World example.
Just trying out some C on some of the project euler questions. My question
I am trying out some globalization in an asp.net mvc2 application but can't get
I am trying out click-once on my local machine using Apache 2.2. I have
I'm trying to build a C++ extension for python using swig. I've followed the
Trying out some things with php and html, I'm having issues trying to get
Was trying out some code with the EF code first method and ran into
I'm trying out ExtJS Pivot Grid. I'm using the examples pretty much as-is from
Just trying out ubuntu server on my pc and have been testing some commands

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.