]> granicus.if.org Git - liblinear/log
liblinear
2 years agofixed csr_scale resize
Sinacam [Fri, 5 Aug 2022 12:09:44 +0000 (20:09 +0800)]
fixed csr_scale resize

2 years agomoved all numpy references through scipy
Sinacam [Fri, 5 Aug 2022 11:53:04 +0000 (19:53 +0800)]
moved all numpy references through scipy

2 years agoremove one extra space
Chih-Jen Lin [Mon, 11 Jul 2022 23:44:41 +0000 (07:44 +0800)]
remove one extra space

2 years agoadd an empty line in matlab/Makefile to separate two rules
Chih-Jen Lin [Sun, 3 Jul 2022 03:37:41 +0000 (11:37 +0800)]
add an empty line in matlab/Makefile to separate two rules

2 years agoCross compilation fix
NaN-git [Wed, 3 Feb 2021 15:29:22 +0000 (16:29 +0100)]
Cross compilation fix

Signed-off-by: Sinacam <stinkingmadgod@gmail.com>
2 years agoappending to sys.path has no effect in all our use cases but causes problems in certa...
Sinacam [Tue, 5 Apr 2022 12:58:42 +0000 (20:58 +0800)]
appending to sys.path has no effect in all our use cases but causes problems in certain libraries

2 years agoWindows binary: SHVER 5 with rigor regression test v244
ericliu8168 [Thu, 17 Mar 2022 04:18:02 +0000 (12:18 +0800)]
Windows binary: SHVER 5 with rigor regression test

2 years agoupdate python: liblinear.so.4 to liblinear.so.5
ericliu8168 [Wed, 16 Mar 2022 10:49:30 +0000 (18:49 +0800)]
update python: liblinear.so.4 to liblinear.so.5

2 years agoWindows binary with SHVER from 4 to 5
ericliu8168 [Tue, 15 Mar 2022 06:55:34 +0000 (14:55 +0800)]
Windows binary with SHVER from 4 to 5

2 years agobuild windows wheels automatically
Sinacam [Sat, 12 Mar 2022 14:18:20 +0000 (22:18 +0800)]
build windows wheels automatically

2 years agoudpated setup.py
Sinacam [Tue, 8 Mar 2022 04:43:28 +0000 (12:43 +0800)]
udpated setup.py

2 years agoupdated setup.py
Sinacam [Mon, 7 Mar 2022 16:17:47 +0000 (00:17 +0800)]
updated setup.py

2 years agochange version number to 2.44 and COPYRIGHT year to 2022
Chih-Jen Lin [Sun, 6 Mar 2022 23:02:19 +0000 (07:02 +0800)]
change version number to 2.44 and COPYRIGHT year to 2022

2 years agochange SHVER from 4 to 5
Chih-Jen Lin [Sun, 6 Mar 2022 22:58:31 +0000 (06:58 +0800)]
change SHVER from 4 to 5

due to earlier introduction of

- one-class svm

- no regularization of the bias

3 years agolinear.cpp (check_parameter): only check value of p if L2R_L2LOSS_SVR.
David Miguel Susano Pinto [Tue, 14 Sep 2021 14:02:02 +0000 (15:02 +0100)]
linear.cpp (check_parameter): only check value of p if L2R_L2LOSS_SVR.

The parameter `p` is only used by the L2R_L2LOSS_SVR solver so skip
checking its value unless using it.  This is important because it has
no default value meaning that we are effectively forcing the user to
set it even if they don't use it.

Signed-off-by: Chih-Jen Lin <cjlin@csie.ntu.edu.tw>
3 years agofixed type of struct problem y
Sinacam [Fri, 9 Jul 2021 10:31:34 +0000 (18:31 +0800)]
fixed type of struct problem y

3 years agoAdd instructions for Python home-directory installation
kevin1kevin1k [Thu, 8 Apr 2021 04:34:23 +0000 (12:34 +0800)]
Add instructions for Python home-directory installation

3 years agoFix minor issue of README
kevin1kevin1k [Mon, 22 Mar 2021 13:53:45 +0000 (21:53 +0800)]
Fix minor issue of README

3 years agoUpdate prebuilt binaries for windows v243
juinanyen [Wed, 24 Feb 2021 07:30:38 +0000 (15:30 +0800)]
Update prebuilt binaries for windows

3 years agoin matlab/README mention that Windows users must copy mex files to the matlab directory
Chih-Jen Lin [Tue, 16 Feb 2021 01:52:12 +0000 (09:52 +0800)]
in matlab/README mention that Windows users must copy mex files to the matlab directory

3 years agochange version number for 2.43 release
Chih-Jen Lin [Mon, 15 Feb 2021 11:45:27 +0000 (19:45 +0800)]
change version number for 2.43 release
change year in COPYRIGHT

improve installation description in python/README

3 years agoAdd more instructions for the python interface installation
juinanyen [Sun, 14 Feb 2021 10:53:06 +0000 (10:53 +0000)]
Add more instructions for the python interface installation

3 years agoFix package name and README
kevin1kevin1k [Thu, 11 Feb 2021 16:51:52 +0000 (00:51 +0800)]
Fix package name and README

3 years agoFix package name error
kevin1kevin1k [Wed, 10 Feb 2021 15:06:32 +0000 (23:06 +0800)]
Fix package name error

3 years agoReplace tabs with four spaces in Python files
kevin1kevin1k [Wed, 10 Feb 2021 10:05:13 +0000 (18:05 +0800)]
Replace tabs with four spaces in Python files

Co-authored-by: Yu-Sheng Li <kevin1kevin1k@gmail.com>
Co-authored-by: Jui-Nan Yen <gkevinyen5418@gmail.com>
3 years agoEnable installation with PyPI
kevin1kevin1k [Wed, 10 Feb 2021 10:03:03 +0000 (18:03 +0800)]
Enable installation with PyPI

Co-authored-by: Yu-Sheng Li <kevin1kevin1k@gmail.com>
Co-authored-by: Jui-Nan Yen <gkevinyen5418@gmail.com>
3 years agoChange the CFLAGS setting ` CFLAGS="\$CFLAGS -std=c99" ' to default setting in the...
Sheng-Wei Chen [Thu, 31 Dec 2020 01:02:32 +0000 (09:02 +0800)]
Change the CFLAGS setting ` CFLAGS="\$CFLAGS -std=c99" ' to default setting in the mex functions,
that is, we remove it in the mex functions.

We have tested this change with the environments `Visual Studio 2019' and `MinGW' in `Windows 10',
`GCC/G++' in `Linux'.

4 years agoAdjust eps parameter comment in README: "stopping tolerance"
Benedikt Waldvogel [Sun, 29 Nov 2020 15:49:55 +0000 (16:49 +0100)]
Adjust eps parameter comment in README: "stopping tolerance"

The comment was changed in linear.h via https://github.com/cjlin1/liblinear/commit/7b0193baec9a443684e4a079ae4a2040971f67cf.
However, the code snippet in the README was not adjusted.

Signed-off-by: Chih-Jen Lin <cjlin@csie.ntu.edu.tw>
4 years agoMove warning reaching max iter for dual L1-loss SVM and dual L1-loss SVR to train_one()
Chih-Jen Lin [Thu, 12 Nov 2020 12:09:34 +0000 (20:09 +0800)]
Move warning reaching max iter for dual L1-loss SVM and dual L1-loss SVR to train_one()

4 years agoAdd back warning for dual L1-loss SVM and dual L1-loss SVR
leepei [Wed, 11 Nov 2020 19:53:50 +0000 (19:53 +0000)]
Add back warning for dual L1-loss SVM and dual L1-loss SVR

4 years agominor fixes:
Chih-Jen Lin [Sat, 7 Nov 2020 08:51:37 +0000 (16:51 +0800)]
minor fixes:

- COPYRIGHT year

- return var instead of return (var) for constancy

4 years agoIn train_one we specify max_iter of dual solvers to be 300, but
Chih-Jen Lin [Wed, 4 Nov 2020 07:20:10 +0000 (15:20 +0800)]
In train_one we specify max_iter of dual solvers to be 300, but
the default max_iter in function definition was 500.
For example,

static int solve_l2r_l1l2_svc(const problem *prob, const parameter *param, double *w, double Cp, double Cn, int max_iter=500)

Now 500 is changed to 300 to reflect what we really used.

4 years agoUpdate windows and matlab binaries v242
Wei-Lin Chiang [Sat, 31 Oct 2020 07:27:00 +0000 (00:27 -0700)]
Update windows and matlab binaries

4 years agoStopping conditon of dual CD method for L1- and L2-loss SVM is changed
Chih-Jen Lin [Wed, 28 Oct 2020 09:01:51 +0000 (17:01 +0800)]
Stopping conditon of dual CD method for L1- and L2-loss SVM is changed

Currently the stopping condition is M-m <= \epsilon, where

M = max proj_gard(alpha) and m = min proj_grad(alpha).

This condition works well in practice, but we must ensure that the
following situation does not occur.

  M, m >> 0  or M,m << 0
but
  M - m <= \epsilon.

From the optimality condition, |M| and |m| must be close to zero.
For example, because

  grad_i f(0) = -1, for all i.

M=m= -1 and they satisfy M-m <= \epsilon.  Thus we add |M| <=\epsilon
and |m| <= \epsilon$ into the stopping condition.  In fact we can use
only these two inequalities as the stopping condition, but for
historical reasons we keep M-m <= \epsilon as the main condition to
check.

4 years agoUpdate windows and matlab binaries
Wei-Lin Chiang [Fri, 23 Oct 2020 18:18:39 +0000 (11:18 -0700)]
Update windows and matlab binaries

4 years agoupdate version number in linear.h for 2.42 release
Chih-Jen Lin [Wed, 21 Oct 2020 00:00:27 +0000 (08:00 +0800)]
update version number in linear.h for 2.42 release

4 years agoAutomatic switching from dual CD to primal Newton if slow convergence occurs.
Chih-Jen Lin [Tue, 20 Oct 2020 23:57:44 +0000 (07:57 +0800)]
Automatic switching from dual CD to primal Newton if slow convergence occurs.

For l2-regularized logistic regression and L2-loss linear SVM,
liblinear provides two types of solvers: dual CD and primal Newton.
They are respectively first-order and second-order methods,
and are suitable under different circumstances.

The default solver (dual CD) may be slow
in some situations (e.g., data not scaled). In the past,
if slow convergence occurs, liblinear
issues a warning message suggesting users to use the
primal Newton method. In this commit this switch becomes automatic
to ensure that a reasonably good approximate solution of the
optimization problem is directly returned to the user.

The main change is in train_one(). It checks if iter of dual CD >= max_iter
and then switch to call primal Newton. Stopping tolerance is also adjusted.

minor changes:
- in comments tabs replaced with spaces
- for calling dual solvers, instead of passing individual parameters, the structure param is now passed

4 years ago- add max Newton iter warning in newton.cpp
Chih-Jen Lin [Tue, 20 Oct 2020 23:43:05 +0000 (07:43 +0800)]
- add max Newton iter warning in newton.cpp

- in code comments replace tabs with spaces

4 years agoTwo changes in newton.cpp
Chih-Jen Lin [Fri, 16 Oct 2020 12:40:20 +0000 (20:40 +0800)]
Two changes in newton.cpp

- in the previous version, the output is like

init f 1.403e+07
iter  1 f 5.390e+06 |g| 6.197e+05 CG   2 step_size 1.00e+00

we indeed print

f(w_k) |g(w_{k-1})|

So |g| 6.197e+05 is the grad at f(0) = 1.403e+07.

The output is changed to

init f 1.403e+07 |g| 6.197e+05
iter  1 f 5.390e+06 |g| 2.118e+05 CG   2 step_size 1.00e+00
iter  2 f 1.925e+06 |g| 7.244e+04 CG   4 step_size 1.00e+00

Each line shows the new f and |g| after an iteration with
CG steps and line search step_size

- in pcg(), we calculate

        alpha = zTr/ddot_(&n, d, &inc, Hd, &inc);

before the stopping condition based on quadratic approximations.
But after the previous CG step, the new zTr and dHd may both be zero
(or very close to zero). Then 0/0 may occur. In such a situation CG
should stop. Now a safeguard check is added:

+ dHd = ddot_(&n, d, &inc, Hd, &inc);
+ // avoid 0/0 in getting alpha
+ if (dHd <= 1.0e-16)
+ break;

4 years agoRemove unused local variable
Benedikt Waldvogel [Sun, 4 Oct 2020 17:38:27 +0000 (19:38 +0200)]
Remove unused local variable

Signed-off-by: Chih-Jen Lin <cjlin@csie.ntu.edu.tw>
4 years agoRemove unused parameter
Benedikt Waldvogel [Sun, 4 Oct 2020 17:34:12 +0000 (19:34 +0200)]
Remove unused parameter

Signed-off-by: Chih-Jen Lin <cjlin@csie.ntu.edu.tw>
4 years agoExport get_decfun_rho and check_oneclass_model from liblinear.dll
Christoph Gohlke [Mon, 17 Aug 2020 08:24:20 +0000 (01:24 -0700)]
Export get_decfun_rho and check_oneclass_model from liblinear.dll

Signed-off-by: Chih-Jen Lin <cjlin@csie.ntu.edu.tw>
4 years agoupdate version number in linear.h to 2.41 v241
Chih-Jen Lin [Wed, 29 Jul 2020 09:06:49 +0000 (17:06 +0800)]
update version number in linear.h to 2.41

4 years agoUpdate windows and matlab binaries
Wei-Lin Chiang [Tue, 28 Jul 2020 14:37:38 +0000 (22:37 +0800)]
Update windows and matlab binaries

4 years agoAdd one-class (-s 21) help message to matlab/train.c
Hung-Yi Chou [Tue, 28 Jul 2020 10:26:16 +0000 (10:26 +0000)]
Add one-class (-s 21) help message to matlab/train.c

4 years agomodifications are made for one-class svm:
Hung-Yi Chou [Mon, 27 Jul 2020 01:57:38 +0000 (01:57 +0000)]
modifications are made for one-class svm:

-In liblinear.cpp, fix bug that rho is wrongly calculated

-In matlab/linear_model_matlab.c, fix bug that matlab did not
read rho from matlab model struct

-In matlab/train.c, a default nu was not set, now 0.5

4 years agoFix Makefile.win and update windows and matlab binaries v240
Wei-Lin Chiang [Mon, 20 Jul 2020 17:15:55 +0000 (01:15 +0800)]
Fix Makefile.win and update windows and matlab binaries

4 years agoadd -R explanation in README (and mention that generally it's not needed)
Chih-Jen Lin [Mon, 20 Jul 2020 01:27:26 +0000 (09:27 +0800)]
add -R explanation in README (and mention that generally it's not needed)

4 years agoAdd -R option to matlab and python interface
Wei-Lin Chiang [Sun, 19 Jul 2020 13:31:12 +0000 (21:31 +0800)]
Add -R option to matlab and python interface

4 years agoNewton solver is changed from trust region to line search
Wei-Lin Chiang [Sun, 19 Jul 2020 10:31:37 +0000 (18:31 +0800)]
Newton solver is changed from trust region to line search

Specific changes are as follows.

- file name change:

tron.cpp and tron.h are changed to newton.cpp and newton.h, respectively.

In newton.cpp, the subroutine trpcg is changed to pcg.

Some functions (in the class newton) used for trust region are removed.

- classes of functions in linear.cpp:

A new class of function l2r_erm_fun is added to cover lr and svm.
It assumes the following function form

min_w w^Tw/2 + \sum C_i \xi(w^Tx_i), where \xi() is the loss

Some common utilities in particular the line-search subroutine (see below) are
implemented here.

- line search subroutines:

A special line-search subroutine for l2r_erm_fun is implemented in linear.cpp
so for each step size the function value can be cheaply calculated.

A base implementation of line search is provided in newton.cpp, where it
calculates every function value from scratch.

We require that the line-search subroutine to update w and also maintain
the function value.

- CG stopping criterion

It's changed to check a quadratic approximation instead of the
residual. See the release notes of version 2.40.

- CG stopping tolerance

LIBLINEAR enlarged eps_cg if the initial primal solution is not
null. This was from Chu et al. (2015) to avoid too many CG steps
in warm start for parameter selection. We found that this setting
is no longer needed; see details in version 2.40 release notes.

4 years agoAdd a new option -R for not regularizing the bias
Wei-Lin Chiang [Thu, 16 Jul 2020 14:25:44 +0000 (22:25 +0800)]
Add a new option -R for not regularizing the bias

4 years agoversion number in linear.h updated to 2.40
Chih-Jen Lin [Wed, 27 May 2020 11:18:03 +0000 (19:18 +0800)]
version number in linear.h updated to 2.40

4 years agoFix one comment in linear.cpp and a description of get_decfun_bias() in python/README
Chih-Jen Lin [Sun, 24 May 2020 09:27:09 +0000 (17:27 +0800)]
Fix one comment in linear.cpp and a description of get_decfun_bias() in python/README

4 years ago solver for one-class SVM supported
Chou Hung-Yi [Sat, 23 May 2020 15:25:17 +0000 (23:25 +0800)]
solver for one-class SVM supported
    -add new solver ONECLASS_SVM (-s 21)
    -add function solve_oneclass_svm
    -add new attribute rho to model
    -add new attribute nu to parameter
    -modify function check_parameter, get_decfun_bias
        to reject one-class SVM from accessing bias
    -modify/add function get_decfun_coef, get_decfun_rho, get_w_value
        for one-class SVM to get its decision function
    -add function check_oneclass_model
    -modify python/MATLAB interface and train.c update
    -REDME update

4 years agoinit_sol in the parameter structure was introduced earlier but no explanation in...
Chih-Jen Lin [Fri, 27 Mar 2020 10:26:27 +0000 (18:26 +0800)]
init_sol in the parameter structure was introduced earlier but no explanation in README. Now added

4 years agochange SHVER from 3 to 4 due to the function name change or new functions
Chih-Jen Lin [Fri, 21 Feb 2020 22:37:36 +0000 (06:37 +0800)]
change SHVER from 3 to 4 due to the function name change or new functions

-  TRON::trcg -> changed to TRON::trcpg (version 2.20)
-  find_parameters_C -> changed to find_parameters (version 2.30)
-  possibly a new solver for one-class SVM

5 years agochange a feature_node * variable name from s to xi in get_diag_preconditioner() for...
Chih-Jen Lin [Tue, 17 Dec 2019 05:16:33 +0000 (21:16 -0800)]
change a feature_node * variable name from s to xi in get_diag_preconditioner() for consistency with other places

5 years agofix a bug in README building windows binaries
zyque [Tue, 10 Sep 2019 12:50:10 +0000 (20:50 +0800)]
fix a bug in README building windows binaries
update the directory in README to fit visual studio latest version
modify the explanation in matlab/README installation

5 years agoMerge branch 'master' of svm.csie.ntu.edu.tw:liblr
Chih-Jen Lin [Fri, 23 Aug 2019 09:13:01 +0000 (02:13 -0700)]
Merge branch 'master' of svm.csie.ntu.edu.tw:liblr

5 years agoin commit 347607e403e8b43e097ee409a908aa0d186e09f5
Chih-Jen Lin [Fri, 23 Aug 2019 09:12:39 +0000 (02:12 -0700)]
in commit 347607e403e8b43e097ee409a908aa0d186e09f5
we added return 0 into print_null in predict.c. This should
be applied to matlab/predict.c as well.

5 years agoRemove trailing white-space
johncreed [Wed, 31 Jul 2019 15:23:51 +0000 (23:23 +0800)]
Remove trailing white-space

5 years agoAdd log message to matlab/train.c in function do_find_parameters
johncreed [Thu, 27 Jun 2019 04:01:00 +0000 (12:01 +0800)]
Add log message to matlab/train.c in function do_find_parameters

5 years agoRemove redundant trailing whitespace in linear.cpp, python/liblinearutil.py and tron.cpp
johncreed [Thu, 27 Jun 2019 03:53:17 +0000 (11:53 +0800)]
Remove redundant trailing whitespace in linear.cpp, python/liblinearutil.py and tron.cpp

5 years agoremove an unnecessary tab in train.c
Chih-Jen Lin [Thu, 20 Jun 2019 04:39:57 +0000 (21:39 -0700)]
remove an unnecessary tab in train.c

5 years agoUpdate windows and matlab binaries v230
Wei-Lin Chiang [Wed, 20 Mar 2019 12:45:49 +0000 (20:45 +0800)]
Update windows and matlab binaries

The binaries are built by VC 2015 & matlab R2016b on Windows 10

5 years agoChange find_parameter_C to find_parameters in linear.def
johncreed [Wed, 20 Mar 2019 07:47:56 +0000 (15:47 +0800)]
Change find_parameter_C to find_parameters in linear.def

5 years agoFix find_parameters function parameter struct type in linear.h
johncreed [Wed, 20 Mar 2019 01:09:20 +0000 (09:09 +0800)]
Fix find_parameters function parameter struct type in linear.h

5 years agoRemove a redundant newline in help message
johncreed [Tue, 19 Mar 2019 04:52:06 +0000 (12:52 +0800)]
Remove a redundant newline in help message

5 years agochange version number in liblinear.h to 2.30 for the new release
Chih-Jen Lin [Mon, 18 Mar 2019 18:52:47 +0000 (02:52 +0800)]
change version number in liblinear.h to 2.30 for the new release
also change year in COPYRIGHT

5 years agoFix some minor indentation and space issues
Chih-Jen Lin [Mon, 18 Mar 2019 18:32:15 +0000 (02:32 +0800)]
Fix some minor indentation and space issues

5 years agoL2R_L2LOSS_SVR warm start parameter search supported
johncreed [Mon, 18 Mar 2019 09:12:47 +0000 (17:12 +0800)]
L2R_L2LOSS_SVR warm start parameter search supported
-add function find_parameters for parameter search
-modify function find_parameter_C as subroutine of find_parameters
-add function calc_max_p for maximal p parameter for L2R_L2LOSS_SVR
-modify function calc_start_C for L2R_L2LOSS_SVR
-modify function train to support initial solution for L2R_L2LOSS_SVR
-change L2R_L2LOSS_SVR default -e to (0.0001)
-change parameter stopping condition from num_unchanged_w == 3 to 5
-modify python/MATLAB interface and train.c update
-REDME update

5 years agoExplain in python/README that commonutil.py includes functions for both LIBSVM/LIBLINEAR
Chih-Jen Lin [Tue, 26 Feb 2019 21:53:43 +0000 (13:53 -0800)]
Explain in python/README that commonutil.py includes functions for both LIBSVM/LIBLINEAR

5 years agoFix compiling issues in matlab interface
Wei-Lin Chiang [Sat, 29 Dec 2018 20:11:18 +0000 (04:11 +0800)]
Fix compiling issues in matlab interface

Use mex command to build binary files to prevent compatibility issues

6 years agoin solve_l1r_l2_svc, loss_old is initialized in a for loop over num_linesearch
Chih-Jen Lin [Tue, 18 Dec 2018 12:41:46 +0000 (20:41 +0800)]
in solve_l1r_l2_svc, loss_old is initialized in a for loop over num_linesearch
by
if(num_linesearch == 0)
Some compiler think it's not initialized.. Hence this change add loss_old = 0 when it's declared.

6 years agoa _cstr function to encode string to utf-8. Use it for file names in
Chih-Jen Lin [Tue, 18 Dec 2018 02:59:12 +0000 (10:59 +0800)]
a _cstr function to encode string to utf-8. Use it for file names in
loading and saving model. The _cstr implementations are different for
python 2.x and 3.x
This changes follows from the modification in libsvm

6 years agoversion number changed to 2.22 for next release
Chih-Jen Lin [Mon, 17 Dec 2018 11:31:20 +0000 (19:31 +0800)]
version number changed to 2.22 for next release

6 years agoset a max_cg_iter for the CG while loop.
Chih-Jen Lin [Mon, 17 Dec 2018 11:10:11 +0000 (19:10 +0800)]
set a max_cg_iter for the CG while loop.

6 years agoremove trailing space
ppetter1025 [Mon, 12 Nov 2018 06:08:43 +0000 (14:08 +0800)]
remove trailing space

6 years agoin README use an example to explain that -C returns only the best
Chih-Jen Lin [Wed, 24 Oct 2018 10:52:49 +0000 (18:52 +0800)]
in README use an example to explain that -C returns only the best
parameter rather than a model. Users must use the selected parameter
to train a model.

6 years agochange year info in COPYRIGHT v221
Wei-Lin Chiang [Tue, 2 Oct 2018 12:10:30 +0000 (20:10 +0800)]
change year info in COPYRIGHT

6 years agoUpdate windows and matlab binaries
Wei-Lin Chiang [Tue, 2 Oct 2018 12:08:51 +0000 (20:08 +0800)]
Update windows and matlab binaries

The binaries are built by VC 2015 & matlab R2016b on Windows 10

6 years agoChange version number to 221 for 2.21 release
Wei-Lin Chiang [Tue, 2 Oct 2018 11:58:00 +0000 (19:58 +0800)]
Change version number to 221 for 2.21 release

6 years agoChanges due to a modification of the same file in LIBSVM:
ppetter1025 [Mon, 10 Sep 2018 12:24:54 +0000 (20:24 +0800)]
Changes due to a modification of the same file in LIBSVM:

use array for reading data in python/commonutil.py to lower the memory usage

6 years agoChanges due to a bug of the same file in LIBSVM:
ppetter1025 [Mon, 10 Sep 2018 11:50:26 +0000 (19:50 +0800)]
Changes due to a bug of the same file in LIBSVM:

fix a bug in python/commonutil.py for reading pre-computed kernel

6 years agoRename get_diagH to get_diag_preconditioner
Wei-Lin Chiang [Tue, 18 Sep 2018 12:04:55 +0000 (20:04 +0800)]
Rename get_diagH to get_diag_preconditioner

6 years agoChanges due to a bug of the same file in LIBSVM:
Chih-Jen Lin [Mon, 30 Jul 2018 14:21:00 +0000 (22:21 +0800)]
Changes due to a bug of the same file in LIBSVM:

    Fix a bug in python/commonutil.py that the function "csr_scale" does not return the scaled data

6 years ago Include LIBSVM's svm-scale.c in the package.
Chih-Jen Lin [Thu, 26 Jul 2018 15:11:23 +0000 (23:11 +0800)]
Include LIBSVM's svm-scale.c in the package.

    Add two functions (csr_find_scale_param, csr_scale) for data scaling in python interface.

    Remove utility functions (svm_read_problem, evaluations) in liblinearutil.py and directly use them from LIBSVM's commonutil.py. Functions for scaling are also put in commonutil.py.

6 years agoIn svm_read_problem we removed zeros while reading data. Changed to keep them for...
ppetter1025 [Thu, 26 Jul 2018 14:39:36 +0000 (22:39 +0800)]
In svm_read_problem we removed zeros while reading data. Changed to keep them for consistency with LIBSVM (for which zeros must be kept for pre-computed kernels)

6 years agoadd section title "Quick Start with Scipy" in table of contents
ppetter1025 [Thu, 26 Jul 2018 14:38:28 +0000 (22:38 +0800)]
add section title "Quick Start with Scipy" in table of contents

6 years agoPrint more digit of predicted labels (%.17g) as more accurate target values may be...
Chih-Jen Lin [Sat, 30 Jun 2018 00:04:32 +0000 (08:04 +0800)]
Print more digit of predicted labels (%.17g) as more accurate target values may be needed for regression. This change follows from the recent changes in LIBSVM.

6 years agoFix a bug in svm_read_problem of python/liblinearutil.py so float(val) rather than...
ppetter1025 [Tue, 12 Jun 2018 14:10:12 +0000 (22:10 +0800)]
Fix a bug in svm_read_problem of python/liblinearutil.py so float(val) rather than val is used to detect zero fearue values.

6 years agoprint more digits of model parameter: %.16g to %.17g
Chou Hung-Yi [Wed, 23 May 2018 14:51:51 +0000 (22:51 +0800)]
print more digits of model parameter: %.16g to %.17g

6 years agoFixed bug and optimize code in TRON::tron
b92paul [Thu, 8 Mar 2018 07:02:51 +0000 (15:02 +0800)]
Fixed bug and optimize code in TRON::tron

Variable "iter" and "w" won't change in the
while loop of function TRON::tron when the
direction does not lead to sufficient
function-value decrease, so using expression
"iter == 1" as a flag to initialize variables
will cause problems in the first step.
We introduce a new variable "delta_adjusted" to
fix the bug.

The function call "fun_obj->get_diagH(M)" and the
calculation of "(1-alpha_pcg) I + alpha_pcg M"
can be saved if "iter" and "w" remains the same.
We move some lines of code to save the
calculation.

7 years agoInstructions in README for building windows dynamic library: libsvm.dll
Chih-Jen Lin [Mon, 25 Dec 2017 07:56:02 +0000 (15:56 +0800)]
Instructions in README for building windows dynamic library: libsvm.dll
should be liblinear.dll

7 years agomove l2r_lr_fun::get_diagH(double *M) to an earlier place to be consistent
Chih-Jen Lin [Sun, 24 Dec 2017 01:52:27 +0000 (09:52 +0800)]
move l2r_lr_fun::get_diagH(double *M) to an earlier place to be consistent
with l2r_l2_svc_fun::get_diagH(double *M)

7 years agoversion number in linear.h changed to 220 for 2.20 release v220
Wei-Lin Chiang [Thu, 30 Nov 2017 08:53:25 +0000 (16:53 +0800)]
version number in linear.h changed to 220 for 2.20 release

7 years agoUpdate windows and matlab binaries
Wei-Lin Chiang [Tue, 28 Nov 2017 15:15:46 +0000 (23:15 +0800)]
Update windows and matlab binaries

The binaries are built by VC 2015 & matlab R2016b on Windows 10

7 years agoAdd mixed diagonal preconditioner to TRON method
b92paul [Tue, 17 Oct 2017 10:51:40 +0000 (18:51 +0800)]
Add mixed diagonal preconditioner to TRON method

We use (1-alpha)*I + alpha*diag(H_k) with
alpha=0.01 as a preconditioner to run PCG in TRON
method.

Following lines are the changes:
- Change TRON::trcg to TRON::trpcg with
additional argument M for PCG iterations
- Add l2r_l2_svc_fun::get_diagH and
l2r_l2_svc_fun::get_diagH to get diagonal
component of Hessian
- Add static function uTMv for weighted dot
for vector u and v with weight M

For detailed analysis, please check
http://www.csie.ntu.edu.tw/~cjlin/papers/tron_pcg/precondition.pdf

7 years agochange year info in COPYRIGHT
Chih-Jen Lin [Wed, 10 May 2017 08:32:29 +0000 (16:32 +0800)]
change year info in COPYRIGHT

7 years ago in load_model() of linear.cpp, parameters for training only won't be assigned...
Chih-Jen Lin [Sat, 8 Apr 2017 06:47:35 +0000 (14:47 +0800)]
in load_model() of linear.cpp, parameters for training only won't be assigned after reading the model. However, we initialize arrays as NULL for safety. This follows the earlier change in libsvm