Merge branch 'master' into el6

epel8
Ding-Yi Chen 12 years ago
commit 669c7e6f0e

1
.gitignore vendored

@ -5,3 +5,4 @@ libsvm-2.91.tar.gz
/libsvm-3.1.tar.gz /libsvm-3.1.tar.gz
/libsvm-3.11.tar.gz /libsvm-3.11.tar.gz
/libsvm-3.12.tar.gz /libsvm-3.12.tar.gz
/libsvm-3.17.tar.gz

@ -1,7 +1,7 @@
diff -up ./Makefile.packageMain ./Makefile diff -up ./Makefile.packageMain ./Makefile
--- ./Makefile.packageMain 2012-01-02 01:10:52.000000000 +1000 --- ./Makefile.packageMain 2013-03-31 17:06:44.000000000 +1000
+++ ./Makefile 2012-04-05 11:14:42.683613523 +1000 +++ ./Makefile 2013-04-13 22:59:43.796601417 +1000
@@ -1,25 +1,121 @@ @@ -1,11 +1,45 @@
CXX ?= g++ CXX ?= g++
-CFLAGS = -Wall -Wconversion -O3 -fPIC -CFLAGS = -Wall -Wconversion -O3 -fPIC
+CFLAGS = ${RPM_CFLAGS} -Wall -Wconversion -O3 -fPIC +CFLAGS = ${RPM_CFLAGS} -Wall -Wconversion -O3 -fPIC
@ -12,17 +12,15 @@ diff -up ./Makefile.packageMain ./Makefile
+DOT_LIBS=. +DOT_LIBS=.
+LIBS= -L${DOT_LIBS} -lsvm +LIBS= -L${DOT_LIBS} -lsvm
+export LIBSVM_VER +export LIBSVM_VER
-all: svm-train svm-predict svm-scale
+IS_64:=$(shell /bin/uname -i | awk '/64/ {print 64}') +IS_64:=$(shell /bin/uname -i | awk '/64/ {print 64}')
-lib: svm.o
+PREFIXDIR?= /usr +PREFIXDIR?= /usr
+export PREFIXDIR +export PREFIXDIR
+
-all: svm-train svm-predict svm-scale
+LIBDIR?=${PREFIXDIR}/lib${IS_64} +LIBDIR?=${PREFIXDIR}/lib${IS_64}
+export LIBDIR +export LIBDIR
+
-lib: svm.o
+DATADIR?=${PREFIXDIR}/share +DATADIR?=${PREFIXDIR}/share
+export DATADIR +export DATADIR
+ +
@ -50,12 +48,9 @@ diff -up ./Makefile.packageMain ./Makefile
+ +
+libsvm.so.$(SHVER): svm.o +libsvm.so.$(SHVER): svm.o
if [ "$(OS)" = "Darwin" ]; then \ 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 \ else \
- SHARED_LIB_FLAG="-shared -W1,-soname,libsvm.so.$(SHVER)"; \ @@ -14,12 +48,72 @@ lib: svm.o
+ SHARED_LIB_FLAG="-shared -Wl,-soname,libsvm.so.$(SHVER)"; \
fi; \
$(CXX) $${SHARED_LIB_FLAG} svm.o -o libsvm.so.$(SHVER) $(CXX) $${SHARED_LIB_FLAG} svm.o -o libsvm.so.$(SHVER)
svm-predict: svm-predict.c svm.o svm-predict: svm-predict.c svm.o

@ -1,6 +1,6 @@
diff -up ./tools/easy.py.toolsDir ./tools/easy.py diff -up ./tools/easy.py.toolsDir ./tools/easy.py
--- ./tools/easy.py.toolsDir 2010-12-31 15:51:25.000000000 +1000 --- ./tools/easy.py.toolsDir 2013-03-31 17:06:49.000000000 +1000
+++ ./tools/easy.py 2011-06-14 15:15:06.611622820 +1000 +++ ./tools/easy.py 2013-04-13 23:17:53.399526910 +1000
@@ -12,10 +12,10 @@ if len(sys.argv) <= 1: @@ -12,10 +12,10 @@ if len(sys.argv) <= 1:
is_win32 = (sys.platform == 'win32') 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)) print('Output prediction: {0}'.format(predict_test_file))
diff -up ./tools/grid.py.toolsDir ./tools/grid.py diff -up ./tools/grid.py.toolsDir ./tools/grid.py
--- ./tools/grid.py.toolsDir 2011-02-03 01:55:20.000000000 +1000 --- ./tools/grid.py.toolsDir 2013-03-31 17:06:50.000000000 +1000
+++ ./tools/grid.py 2011-06-14 14:56:11.817748117 +1000 +++ ./tools/grid.py 2013-04-13 23:18:53.964522769 +1000
@@ -17,7 +17,7 @@ else: @@ -18,7 +18,7 @@ class GridOption:
def __init__(self, dataset_pathname, options):
is_win32 = (sys.platform == 'win32') dirname = os.path.dirname(__file__)
if not is_win32: if sys.platform != 'win32':
- svmtrain_exe = "../svm-train" - self.svmtrain_pathname = os.path.join(dirname, '../svm-train')
+ svmtrain_exe = "/usr/bin/svm-train" + self.svmtrain_pathname = '/usr/bin/svm-train'
gnuplot_exe = "/usr/bin/gnuplot" self.gnuplot_pathname = '/usr/bin/gnuplot'
else: else:
# example for windows # example for windows

@ -1,6 +1,6 @@
%define shver 2 %define shver 2
Name: libsvm Name: libsvm
Version: 3.12 Version: 3.17
Release: 1%{?dist} Release: 1%{?dist}
Summary: A Library for Support Vector Machines Summary: A Library for Support Vector Machines
@ -220,7 +220,6 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc java/README-Java java/test_applet.html %doc java/README-Java java/test_applet.html
%{_javadir}/%{name}.jar %{_javadir}/%{name}.jar
#%{_datadir}/javadoc/%{name}-%{version}
%endif %endif
%files svm-toy-gtk %files svm-toy-gtk
@ -239,11 +238,50 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Sat Apr 13 2013 Ding-Yi Chen <dchen@redhat.com> - 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 <rel-eng@lists.fedoraproject.org> - 3.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Wed Apr 04 2012 Ding-Yi Chen <dchen@redhat.com> - 3.12-1 * Wed Apr 04 2012 Ding-Yi Chen <dchen@redhat.com> - 3.12-1
- Upstream update: - Upstream update:
svm-toy: support loading/saving of regression data svm-toy: support loading/saving of regression data
python interface: handle the issue of the "0th" feature if using lists 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 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 add setlocale when saving and loading model so not affected by users' locale
* Thu Jan 12 2012 Ding-Yi Chen <dchen@redhat.com> - 3.11-3 * Thu Jan 12 2012 Ding-Yi Chen <dchen@redhat.com> - 3.11-3

43
log

@ -217,4 +217,45 @@ i subroutines to get SVs
svm-toy: support loading/saving of regression data svm-toy: support loading/saving of regression data
python interface: handle the issue of the "0th" feature if using lists 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 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 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

@ -1,2 +1,2 @@
b1543809993e2653dd2787f62c3c390a guide.pdf b1543809993e2653dd2787f62c3c390a guide.pdf
a1b1083fe69a4ac695da753f4c83ed42 libsvm-3.12.tar.gz 67f8b597ce85c1f5288d7838e57ea28a libsvm-3.17.tar.gz

Loading…
Cancel
Save