liblinear

1.install

 ubuntu 14.0

1)sudo apt-get install liblinear-dev   !!!   liblinear1.8 

2)https://github.com/cjlin1/liblinear/tree/v180 download directly liblinear 2.11

ubuntu->make get linear.o prediect.o train.o$(CXX) $${SHARED_LIB_FLAG} linear.o tron.o blas/blas.a -o liblinear.so.$(SHVER)   --->to get   .so

example:

program received signal SIGINT, Interrupt.
0x00007ffff6a303ac in l2r_lr_fun::Xv(double*, double*) () from /usr/lib/liblinear.so.1


www.cnblogs.com/dream-of-snail/p/3793236.html

windows ->

1). Open a dos command box and change to liblinear directory. If
environment variables of VC++ have not been set, type

""C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\vcvars64.bat""

You may have to modify the above command according which version of
VC++ or where it is installed.

2). Type

nmake -f Makefile.win clean all



2)usage (1.8 1.9 2.11diffrent )

train

-s 0~7 11,12,13  ->solver

-C find best parameter c  {only -s 0 2????}

-c 3 set parameter c

-v 5 nr_fold=5   {crossvaliadation->accuary on the valiation,,include train and predict;   all solver ;without model }

-e

predict

-b 0 without output

-b 1 probability{only for logistic regression}

svm output
LIBSVM uses more advanced techniques for SVM probability outputs. The code is a bit complicated so we haven't decided if including it is suitable or no
maysimply deal as like

int check_probability_model(const struct model *model_)
{
    return (model_->param.solver_type==L2R_LR ||
to
int check_probability_model(const struct model *model_)
{
    return 1;















你可能感兴趣的:(机器学习算法)