Questions tagged [liblinear]

LIBLINEAR is a library for large linear classification

LIBLINEAR is an integrated software for large-scale linear classification, regression and distribution estimation. It interfaces to several commonly used languages, such as Python, MATLAB, Java, PHP, Ruby and Perl.

67 questions
2
votes
1 answer

Probabilistic prediction with liblinear (java), with direct usage of the classifier inside the code

Consider the following usage of liblinear (http://liblinear.bwaldvogel.de/): double C = 1.0; // cost of constraints violation double eps = 0.01; // stopping criteria Parameter param = new Parameter(SolverType.L2R_L2LOSS_SVC, C, eps); …
Daniel
  • 5,839
  • 9
  • 46
  • 85
2
votes
0 answers

Liblinear logistic regression output always -1

I am new to machine learning and I am trying to use logistic regression prediction in liblinear using dataset from here http://www.ats.ucla.edu/stat/data/binary.csv I am using java to train and test. However even if I run the prediction on the same…
user3312156
  • 153
  • 1
  • 1
  • 8
2
votes
2 answers

MATLAB Train Interface LIBLINEAR

In the LIBLINEAR docs, we have matlab> model = train(training_label_vector, training_instance_matrix [,'liblinear_options', 'col']); -training_label_vector: An m by 1 vector of training labels. (type must be double) …
user1431282
  • 6,535
  • 13
  • 51
  • 68
1
vote
0 answers

How to set a right max_iter value in sklearn LinearSVC to avoid Convergence Warning?

I refereed to this discussion on stackoverflow. As mentioned in this discussion I normalised my data and set dual = False in LinearSVC . Initially I set the max_iter to default(1000) received the ConvergenceWarning and then I set max_iter to 70000…
raviTeja
  • 338
  • 1
  • 7
  • 21
1
vote
1 answer

Is there a reason why a feature only present in a given class is not being predicted strongly into that class?

Summary & Questions I'm using liblinear 2.30 - I noticed a similar issue in prod, so I tried to isolate it through a simple reduced training with 2 classes, 1 train doc per class, 5 features with same weight in my vocabulary and 1 simple test doc…
Damiox
  • 622
  • 4
  • 12
1
vote
1 answer

How can I count the number of support vectors from R package LiblineaR

For example, is there a way to count the number of support vectors in this classification model? library(LiblineaR) data(iris) attach(iris) x <- iris[,1:4] y <- factor(iris[, 5]) set.seed(1) train <- sample(1:dim(iris)[1],100) detach(iris) xTrain…
Whitebeard
  • 5,945
  • 5
  • 24
  • 31
1
vote
0 answers

scikit learn linearsvc confidence

I'm using scikit-learn's LinearSVC SVM implementation, and I'm trying understand the multi-class prediction. Looking at coef_ and intercept_ I can get the hyperplane weights. For example, on my learning problem with two features and four labels I…
chris
  • 11
  • 2
1
vote
1 answer

Using Accord.Net and Liblinear change class weights

How do I specify class weights for Accord.Net for classification (any model) using Liblinear implementation. Further is there automatic balancing that I can use for unbalanced data similar to sciKit.Learn's implementation. Thanks in advance
azuric
  • 2,679
  • 7
  • 29
  • 44
1
vote
0 answers

liblinear rebuild: binaries freeze

I have been trying to rebuild the windows binaries for liblinear following the instructions in the Readme, using visual c++ and nmake. I need to rebuild because I need the SVM probability outputs. I modified the check_probability_model method in…
fklm
  • 11
  • 1
1
vote
0 answers

Same training data in Liblinear generates different models

I'm using Liblinear in order to train models for a classification problem. I have noticed that changing the order of samples in the training data can result in different models. To test this i have created two different liblinear problems which…
Yonanam
  • 321
  • 1
  • 3
  • 6
1
vote
3 answers

liblinear L1 vs. L2 logistic regression performance difference

I'm training a simple logistic regression classifier using LIBLINEAR. There are only 3 features, and label is binary 0-1. Sample input file: 1 1:355.55660999775586 2:-3.401379785 3:5 1 1:252.43759050148728 2:-3.96044759307 3:9 1 …
menphix
  • 309
  • 4
  • 12
1
vote
2 answers

sklearn: Evaluating LinearSVC's AUC

I know that one would evaluate the AUC of sklearn.svm.SVC by passing in the probability=True option into the constructor, and having the SVM predict probabilities, but I'm not sure how to evaluate sklearn.svm.LinearSVC's AUC. Does anyone have any…
hlin117
  • 20,764
  • 31
  • 72
  • 93
1
vote
1 answer

Does MaltParser actually provide an option for returning probabilities of Parse trees?

While looking at the source code of Malt Parser which actually has class LibLinear.java(jar file) and calls the java version of the liblinear toolkit; I don't find any option/way to return probability despite the information that, in principle…
Linguist
  • 123
  • 1
  • 10
1
vote
1 answer

How to use liblinear with weka gui?

I am using weka to build one model. I have requirement of using liblinear for our model. For testing using weka GUI, I need to add liblinear jar into my classpath but after adding liblinear jar in classpath, Weka GUI still give me error liblinear…
user2335004
  • 121
  • 1
  • 10
1
vote
1 answer

Liblinear Error

I am training my datasets in Liblinear: train heart_scale, but i am getting this error can't open /home/linguistics/.train//train.ini ERROR: Init file not found (/home/linguistics/.train//train.ini) train> Reference: README file from Liblinear's…
Linguist
  • 123
  • 1
  • 10