EnglishFrenchSpanish

OnWorks favicon

liblinear-train - Online in the Cloud

Run liblinear-train in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command liblinear-train that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


liblinear-train - train a linear classifier and produce a model

SYNOPSIS


liblinear-train [options] training_set_file [model_file]

DESCRIPTION


liblinear-train trains a linear classifier using liblinear and produces a model suitable
for use with liblinear-predict(1).

training_set_file is the file containing the data used for training. model_file is the
file to which the model will be saved. If model_file is not provided, it defaults to
training_set_file.model.

To obtain good performances, sometimes one needs to scale the data. This can be done with
svm-scale(1).

OPTIONS


A summary of options is included below.

-s type
Set the type of the solver:

0 ... L2-regularized logistic regression

1 ... L2-regularized L2-loss support vector classification (dual) (default)

2 ... L2-regularized L2-loss support vector classification (primal)

3 ... L2-regularized L1-loss support vector classification (dual)

4 ... multi-class support vector classification

5 ... L1-regularized L2-loss support vector classification

6 ... L1-regularized logistic regression

7 ... L2-regularized logistic regression (dual)

-c cost
Set the parameter C (default: 1)

-e epsilon
Set the tolerance of the termination criterion

For -s 0 and 2:

|f'(w)|_2 <= epsilon*min(pos,neg)/l*|f'(w0)_2, where f is
the primal function and pos/neg are the number of positive/negative data
(default: 0.01)

For -s 1, 3, 4 and 7:

Dual maximal violation <= epsilon; similar to libsvm (default: 0.1)

For -s 5 and 6:

|f'(w)|_inf <= epsilon*min(pos,neg)/l*|f'(w0)|_inf, where f is the primal
function (default: 0.01)

-B bias
If bias >= 0, then instance x becomes [x; bias]; if bias < 0, then
no bias term is added (default: -1)

-wi weight
Weight-adjusts the parameter C of class i by the value weight

-v n n-fold cross validation mode

-C Find parameter C (only for -s 0 and 2)

-q Quiet mode (no outputs).

EXAMPLES


Train a linear SVM using L2-loss function:

liblinear-train data_file

Train a logistic regression model:

liblinear-train -s 0 data_file

Do five-fold cross-validation using L2-loss SVM, using a smaller stopping tolerance 0.001
instead of the default 0.1 for more accurate solutions:

liblinear-train -v 5 -e 0.001 data_file

Conduct cross validation many times by L2-loss SVM and find the parameter C which achieves
the best cross validation accuracy:

train -C datafile

For parameter selection by -C, users can specify other solvers (currently -s 0 and -s 2
are supported) and different number of CV folds. Further, users can use the -c option to
specify the smallest C value of the search range. This setting is useful when users want
to rerun the parameter selection procedure from a specified C under a different setting,
such as a stricter stopping tolerance -e 0.0001 in the above example.

train -C -s 0 -v 3 -c 0.5 -e 0.0001 datafile

Train four classifiers:

positive negative Cp Cn
class 1 class 2,3,4 20 10
class 2 class 1,3,4 50 10
class 3 class 1,2,4 20 10
class 4 class 1,2,3 10 10

liblinear-train -c 10 -w1 2 -w2 5 -w3 2 four_class_data_file

If there are only two classes, we train ONE model. The C values for the two classes are 10
and 50:

liblinear-train -c 10 -w3 1 -w2 5 two_class_data_file

Output probability estimates (for logistic regression only) using liblinear-predict(1):

liblinear-predict -b 1 test_file data_file.model output_file

Use liblinear-train online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Psi
    Psi
    Psi is cross-platform powerful XMPP
    client designed for experienced users.
    There are builds available for MS
    Windows, GNU/Linux and macOS.. Audience:
    End Users...
    Download Psi
  • 2
    Blobby Volley 2
    Blobby Volley 2
    Official continuation of the famous
    Blobby Volley 1.x arcade game..
    Audience: End Users/Desktop. User
    interface: OpenGL, SDL. Programming
    Language: C++, Lua. C...
    Download Blobby Volley 2
  • 3
    SuiteCRM
    SuiteCRM
    SuiteCRM is the award-winning Customer
    Relationship Management (CRM)
    application brought to you by authors
    and maintainers, SalesAgility. It is the
    world�s mos...
    Download SuiteCRM
  • 4
    Poweradmin
    Poweradmin
    Poweradmin is a web-based DNS
    administration tool for PowerDNS server.
    The interface has full support for most
    of the features of PowerDNS. It has full
    support...
    Download Poweradmin
  • 5
    Gin Web Framework
    Gin Web Framework
    Gin is an incredibly fast web framework
    written in Golang that can perform up to
    40 times faster, thanks to its
    martini-like API and custom version of
    httprout...
    Download Gin Web Framework
  • 6
    CEREUS LINUX
    CEREUS LINUX
    CEREUS LINUX basado en MX LINUX con
    varios entornos de escritorios. This is
    an application that can also be fetched
    from
    https://sourceforge.net/projects/cereu...
    Download CEREUS LINUX
  • More »

Linux commands

  • 1
    aa-clickquery
    aa-clickquery
    aa-clickquery - program for querying
    click-apparmor DESCRIPTION: This program
    is used to query click-apparmor for
    information. USAGE: aa-clickquery
    --click-fra...
    Run aa-clickquery
  • 2
    aa-exec-click
    aa-exec-click
    aa-exec-click - program for executing
    click packages under confinement
    DESCRIPTION: This program is used to
    execute click package under AppArmor
    confinement. I...
    Run aa-exec-click
  • 3
    cpio
    cpio
    cpio - copy files to and from archives ...
    Run cpio
  • 4
    cpipe
    cpipe
    cpipe - copy stdin to stdout while
    counting bytes and reporting progress ...
    Run cpipe
  • 5
    FvwmSave
    FvwmSave
    FvwmSave - the Fvwm desktop-layout
    saving module ...
    Run FvwmSave
  • 6
    FvwmSave1
    FvwmSave1
    FvwmSave - the FVWM desktop-layout
    saving module ...
    Run FvwmSave1
  • More »

Ad