From 0f3e08bb4411eacb178a68b150669ffec4f3b603 Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Sat, 13 Apr 2013 23:35:20 +1000 Subject: [PATCH] Upstream update to 3.17 --- .gitignore | 1 + ...javaDir.patch => libsvm-3.17.javaDir.patch | 0 ...ain.patch => libsvm-3.17.packageMain.patch | 23 ++++------ ...onDir.patch => libsvm-3.17.pythonDir.patch | 0 ...svm-toy.patch => libsvm-3.17.svm-toy.patch | 0 ...olsDir.patch => libsvm-3.17.toolsDir.patch | 26 +++++------ libsvm.spec | 44 ++++++++++++++++--- log | 43 +++++++++++++++++- sources | 2 +- 9 files changed, 104 insertions(+), 35 deletions(-) rename libsvm-3.12.javaDir.patch => libsvm-3.17.javaDir.patch (100%) rename libsvm-3.12.packageMain.patch => libsvm-3.17.packageMain.patch (90%) rename libsvm-3.12.pythonDir.patch => libsvm-3.17.pythonDir.patch (100%) rename libsvm-3.12.svm-toy.patch => libsvm-3.17.svm-toy.patch (100%) rename libsvm-3.12.toolsDir.patch => libsvm-3.17.toolsDir.patch (72%) diff --git a/.gitignore b/.gitignore index 0ab1e09..aa1a6ec 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ libsvm-2.91.tar.gz /libsvm-3.1.tar.gz /libsvm-3.11.tar.gz /libsvm-3.12.tar.gz +/libsvm-3.17.tar.gz diff --git a/libsvm-3.12.javaDir.patch b/libsvm-3.17.javaDir.patch similarity index 100% rename from libsvm-3.12.javaDir.patch rename to libsvm-3.17.javaDir.patch diff --git a/libsvm-3.12.packageMain.patch b/libsvm-3.17.packageMain.patch similarity index 90% rename from libsvm-3.12.packageMain.patch rename to libsvm-3.17.packageMain.patch index 5d692ff..dee23cd 100644 --- a/libsvm-3.12.packageMain.patch +++ b/libsvm-3.17.packageMain.patch @@ -1,7 +1,7 @@ diff -up ./Makefile.packageMain ./Makefile ---- ./Makefile.packageMain 2012-01-02 01:10:52.000000000 +1000 -+++ ./Makefile 2012-04-05 11:14:42.683613523 +1000 -@@ -1,25 +1,121 @@ +--- ./Makefile.packageMain 2013-03-31 17:06:44.000000000 +1000 ++++ ./Makefile 2013-04-13 22:59:43.796601417 +1000 +@@ -1,11 +1,45 @@ CXX ?= g++ -CFLAGS = -Wall -Wconversion -O3 -fPIC +CFLAGS = ${RPM_CFLAGS} -Wall -Wconversion -O3 -fPIC @@ -12,17 +12,15 @@ diff -up ./Makefile.packageMain ./Makefile +DOT_LIBS=. +LIBS= -L${DOT_LIBS} -lsvm +export LIBSVM_VER - --all: svm-train svm-predict svm-scale +IS_64:=$(shell /bin/uname -i | awk '/64/ {print 64}') - --lib: svm.o +PREFIXDIR?= /usr +export PREFIXDIR -+ + +-all: svm-train svm-predict svm-scale +LIBDIR?=${PREFIXDIR}/lib${IS_64} +export LIBDIR -+ + +-lib: svm.o +DATADIR?=${PREFIXDIR}/share +export DATADIR + @@ -50,12 +48,9 @@ diff -up ./Makefile.packageMain ./Makefile + +libsvm.so.$(SHVER): svm.o if [ "$(OS)" = "Darwin" ]; then \ -- SHARED_LIB_FLAG="-dynamiclib -W1,-install_name,libsvm.so.$(SHVER)"; \ -+ SHARED_LIB_FLAG="-dynamiclib -Wl,-install_name,libsvm.so.$(SHVER)"; \ + SHARED_LIB_FLAG="-dynamiclib -Wl,-install_name,libsvm.so.$(SHVER)"; \ else \ -- SHARED_LIB_FLAG="-shared -W1,-soname,libsvm.so.$(SHVER)"; \ -+ SHARED_LIB_FLAG="-shared -Wl,-soname,libsvm.so.$(SHVER)"; \ - fi; \ +@@ -14,12 +48,72 @@ lib: svm.o $(CXX) $${SHARED_LIB_FLAG} svm.o -o libsvm.so.$(SHVER) svm-predict: svm-predict.c svm.o diff --git a/libsvm-3.12.pythonDir.patch b/libsvm-3.17.pythonDir.patch similarity index 100% rename from libsvm-3.12.pythonDir.patch rename to libsvm-3.17.pythonDir.patch diff --git a/libsvm-3.12.svm-toy.patch b/libsvm-3.17.svm-toy.patch similarity index 100% rename from libsvm-3.12.svm-toy.patch rename to libsvm-3.17.svm-toy.patch diff --git a/libsvm-3.12.toolsDir.patch b/libsvm-3.17.toolsDir.patch similarity index 72% rename from libsvm-3.12.toolsDir.patch rename to libsvm-3.17.toolsDir.patch index 1f4c1d2..a303895 100644 --- a/libsvm-3.12.toolsDir.patch +++ b/libsvm-3.17.toolsDir.patch @@ -1,6 +1,6 @@ diff -up ./tools/easy.py.toolsDir ./tools/easy.py ---- ./tools/easy.py.toolsDir 2010-12-31 15:51:25.000000000 +1000 -+++ ./tools/easy.py 2011-06-14 15:15:06.611622820 +1000 +--- ./tools/easy.py.toolsDir 2013-03-31 17:06:49.000000000 +1000 ++++ ./tools/easy.py 2013-04-13 23:17:53.399526910 +1000 @@ -12,10 +12,10 @@ if len(sys.argv) <= 1: is_win32 = (sys.platform == 'win32') @@ -39,14 +39,14 @@ diff -up ./tools/easy.py.toolsDir ./tools/easy.py print('Output prediction: {0}'.format(predict_test_file)) diff -up ./tools/grid.py.toolsDir ./tools/grid.py ---- ./tools/grid.py.toolsDir 2011-02-03 01:55:20.000000000 +1000 -+++ ./tools/grid.py 2011-06-14 14:56:11.817748117 +1000 -@@ -17,7 +17,7 @@ else: - - is_win32 = (sys.platform == 'win32') - if not is_win32: -- svmtrain_exe = "../svm-train" -+ svmtrain_exe = "/usr/bin/svm-train" - gnuplot_exe = "/usr/bin/gnuplot" - else: - # example for windows +--- ./tools/grid.py.toolsDir 2013-03-31 17:06:50.000000000 +1000 ++++ ./tools/grid.py 2013-04-13 23:18:53.964522769 +1000 +@@ -18,7 +18,7 @@ class GridOption: + def __init__(self, dataset_pathname, options): + dirname = os.path.dirname(__file__) + if sys.platform != 'win32': +- self.svmtrain_pathname = os.path.join(dirname, '../svm-train') ++ self.svmtrain_pathname = '/usr/bin/svm-train' + self.gnuplot_pathname = '/usr/bin/gnuplot' + else: + # example for windows diff --git a/libsvm.spec b/libsvm.spec index aea85fe..bba690b 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -1,7 +1,7 @@ %define shver 2 Name: libsvm -Version: 3.12 -Release: 3%{?dist} +Version: 3.17 +Release: 1%{?dist} Summary: A Library for Support Vector Machines Group: Development/Libraries @@ -220,7 +220,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %doc java/README-Java java/test_applet.html %{_javadir}/%{name}.jar -#%{_datadir}/javadoc/%{name}-%{version} %endif %files svm-toy-gtk @@ -239,6 +238,39 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Apr 13 2013 Ding-Yi Chen - 3.17-1 +- Upstream update from 3.13 to 3.17 + svm.c and svm.h: + add sv_indices in model structure, so users can know which training instances are SVs + two library funs svm_get_sv_indices and svm_get_nr_sv are added + max_iter warning moved to stderr so -q won't disable it + svm-train.c: + usage modified to stress that multiclass is supported + svm-predict.c: + add -q for svm-predict + svm-scale.c: + issue a warning if feature indices do not start from 1 + issue a warning for inconsistency between scaling-factor file and input file + tools: + subset.py is written to be much faster + fix the bug of not freeing sv_indices + tools/grid.py: + -null option: allow the search on C or g only + -resume option: resume tasks from an earlier run + can be called as a python module + python interface: + local package searched first + libsvm options can be str or list + param.show() becomes print(param) + tools/: + easy.py fails in 3.15. Fix it by modifying grid.py + svm.cpp: + if class labels are 1 and -1, ensure labels[0] = 1 and labels[1] = -1 + initialize model->sv_indices as null in svm_load_model + if nr_fold > # data, change nr_fold to be # data and ro leave-one-out cv + matlab interface: + handle the problem where output variables are not specified + * Thu Feb 14 2013 Fedora Release Engineering - 3.12-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild @@ -247,9 +279,9 @@ rm -rf $RPM_BUILD_ROOT * Wed Apr 04 2012 Ding-Yi Chen - 3.12-1 - Upstream update: - svm-toy: support loading/saving of regression data - python interface: handle the issue of the "0th" feature if using lists - tools/grid.py: not redrawing contour if c,g, cv doesn't change + svm-toy: support loading/saving of regression data + python interface: handle the issue of the "0th" feature if using lists + tools/grid.py: not redrawing contour if c,g, cv doesn't change add setlocale when saving and loading model so not affected by users' locale * Thu Jan 12 2012 Ding-Yi Chen - 3.11-3 diff --git a/log b/log index f37fc86..4c7d592 100644 --- a/log +++ b/log @@ -217,4 +217,45 @@ i subroutines to get SVs svm-toy: support loading/saving of regression data python interface: handle the issue of the "0th" feature if using lists tools/grid.py: not redrawing contour if c,g, cv doesn't change - add setlocale when saving and loading model so not affected by users' locale \ No newline at end of file + add setlocale when saving and loading model so not affected by users' locale + +3.13: 2012/11/06 + svm.c and svm.h: + add sv_indices in model structure, so users can know which training instances are SVs + two library funs svm_get_sv_indices and svm_get_nr_sv are added + max_iter warning moved to stderr so -q won't disable it + svm-train.c: + usage modified to stress that multiclass is supported + svm-predict.c: + add -q for svm-predict + svm-scale.c: + issue a warning if feature indices do not start from 1 + issue a warning for inconsistency between scaling-factor file and input file + tools: + subset.py is written to be much faster + +3.14: 2012/11/16 + fix a bug: we didn't re-compile windows binary after updating svm.def + +3.15: 2013/1/27 + fix the bug of not freeing sv_indices + tools/grid.py: + -null option: allow the search on C or g only + -resume option: resume tasks from an earlier run + can be called as a python module + python interface: + local package searched first + libsvm options can be str or list + param.show() becomes print(param) + +3.16: 2013/1/27 + tools/: + easy.py fails in 3.15. Fix it by modifying grid.py + +3.17: 2013/04/01 + svm.cpp: + if class labels are 1 and -1, ensure labels[0] = 1 and labels[1] = -1 + initialize model->sv_indices as null in svm_load_model + if nr_fold > # data, change nr_fold to be # data and ro leave-one-out cv + matlab interface: + handle the problem where output variables are not specified \ No newline at end of file diff --git a/sources b/sources index a61604a..5984ec3 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ b1543809993e2653dd2787f62c3c390a guide.pdf -a1b1083fe69a4ac695da753f4c83ed42 libsvm-3.12.tar.gz +67f8b597ce85c1f5288d7838e57ea28a libsvm-3.17.tar.gz