package linwrap

  1. Overview
  2. Docs
Wrapper on top of liblinear-tools

Install

Dune Dependency

Authors

Maintainers

Sources

v9.1.0.tar.gz
sha256=dabf5b1eec310c73a2d61d82275bc9da904653dc2d16ffc40cc5627c1393e04a
md5=b7bdf8ac6a6a2af8033c6bef82b6c2ca

Description

Linwrap can be used to train a L2-regularized logistic regression classifier or a linear Support Vector Regressor. You can optimize C (the L2 regularization parameter), w (the class weight) or k (the number of bags, i.e. use bagging). You can also find the optimal classification threshold using MCC maximization, use k-folds cross validation, parallelization, etc. In the regression case, you can only optimize C and epsilon.

When using bagging, each model is trained on balanced bootstraps from the training set (one bootstrap for the positive class, one for the negative class). The size of the bootstrap is the size of the smallest (under-represented) class.

usage: linwrap -i : training set or DB to screen [-o ]: predictions output file [-np ]: ncores [-c ]: fix C [-e ]: fix epsilon (for SVR); (0 <= epsilon <= max_i(|y_i|)) [-w ]: fix w1 [--no-plot]: no gnuplot [-k ]: number of bags for bagging (default=off) [{-n|--NxCV} ]: folds of cross validation [--mcc-scan]: MCC scan for a trained model (requires n>1) also requires (c, w, k) to be known [--seed ]: fix random seed [-p ]: training set portion (in [0.0:1.0]) [--pairs]: read from .AP files (atom pairs; will offset feat. indexes by 1) [--train <train.liblin>]: training set (overrides -p) [--valid <valid.liblin>]: validation set (overrides -p) [--test <test.liblin>]: test set (overrides -p) [{-l|--load} ]: prod. mode; use trained models [{-s|--save} ]: train. mode; save trained models [-f]: force overwriting existing model file [--scan-c]: scan for best C [--scan-e ]: epsilon scan #steps for SVR [--regr]: regression (SVR); also, implied by -e and --scan-e [--scan-w]: scan weight to counter class imbalance [--w-range ::]: specific range for w (semantic=start:nsteps:stop) [--e-range ::]: specific range for e (semantic=start:nsteps:stop) [--c-range <float,float,...>] explicit scan range for C (example='0.01,0.02,0.03') [--k-range <int,int,...>] explicit scan range for k (example='1,2,3,5,10') [--scan-k]: scan number of bags (advice: optim. k rather than w)

Published: 07 Oct 2021

README

linwrap

Wrapper on top of liblinear-tools.

Linwrap can be used to train a L2-regularized logistic regression classifier or a linear Support Vector Regressor. You can optimize C (the L2 regularization parameter), w (the class weight) or k (the number of bags, i.e. use bagging). You can also find the optimal classification threshold using MCC maximization, use k-folds cross validation, parallelization, etc. In the regression case, you can only optimize C and epsilon.

Bibliography

[1] Fan, R. E., Chang, K. W., Hsieh, C. J., Wang, X. R., & Lin, C. J. (2008). LIBLINEAR: A library for large linear classification. Journal of machine learning research, 9(Aug), 1871-1874.

[2] Hsu, C. W., Chang, C. C., & Lin, C. J. (2003). A practical guide to support vector classification.

[3] Hsia, J. Y., & Lin, C. J. (2020). Parameter selection for linear support vector regression. IEEE Transactions on Neural Networks and Learning Systems.

[4] Breiman, L. (1996). Bagging predictors. Machine learning, 24(2), 123-140.

Dependencies (11)

  1. parany >= "11.0.0"
  2. molenc
  3. minicli >= "5.0.0"
  4. dune >= "1.10"
  5. dolog >= "6.0.0"
  6. dokeysto_camltc
  7. cpm >= "11.0.0"
  8. conf-liblinear-tools
  9. bst
  10. batteries >= "3.0.0"
  11. base-unix

Dev Dependencies

None

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.