diff -up ./FAQ.html.orig ./FAQ.html diff -up ./java/libsvm/svm.java.orig ./java/libsvm/svm.java diff -up ./java/libsvm/svm_model.java.orig ./java/libsvm/svm_model.java --- ./java/libsvm/svm_model.java.orig 2007-01-13 08:23:39.000000000 +1000 +++ ./java/libsvm/svm_model.java 2008-04-29 15:48:00.000000000 +1000 @@ -4,6 +4,7 @@ package libsvm; public class svm_model implements java.io.Serializable { + static final long serialVersionUID = 2709444323471798245L; svm_parameter param; // parameter int nr_class; // number of classes, = 2 in regression/one class svm int l; // total #SV diff -up ./java/libsvm/svm_node.java.orig ./java/libsvm/svm_node.java --- ./java/libsvm/svm_node.java.orig 2003-10-11 22:30:47.000000000 +1000 +++ ./java/libsvm/svm_node.java 2008-04-29 15:48:00.000000000 +1000 @@ -1,6 +1,7 @@ package libsvm; public class svm_node implements java.io.Serializable { + static final long serialVersionUID = 2709444323471798245L; public int index; public double value; } diff -up ./java/libsvm/svm_parameter.java.orig ./java/libsvm/svm_parameter.java --- ./java/libsvm/svm_parameter.java.orig 2006-03-04 01:44:14.000000000 +1000 +++ ./java/libsvm/svm_parameter.java 2008-04-29 15:48:00.000000000 +1000 @@ -1,6 +1,7 @@ package libsvm; public class svm_parameter implements Cloneable,java.io.Serializable { + static final long serialVersionUID = 2709444323471798245L; /* svm_type */ public static final int C_SVC = 0; public static final int NU_SVC = 1; diff -up ./java/libsvm/svm_problem.java.orig ./java/libsvm/svm_problem.java --- ./java/libsvm/svm_problem.java.orig 2003-10-11 22:30:47.000000000 +1000 +++ ./java/libsvm/svm_problem.java 2008-04-29 15:48:00.000000000 +1000 @@ -1,6 +1,7 @@ package libsvm; public class svm_problem implements java.io.Serializable { + static final long serialVersionUID = -4451389443706847272L; public int l; public double[] y; public svm_node[][] x; diff -up ./java/Makefile.orig ./java/Makefile --- ./java/Makefile.orig 2007-11-11 22:17:30.000000000 +1000 +++ ./java/Makefile 2008-04-29 15:48:00.000000000 +1000 @@ -3,13 +3,22 @@ FILES = libsvm/svm.class libsvm/svm_mode libsvm/svm_parameter.class libsvm/svm_problem.class \ svm_train.class svm_predict.class svm_toy.class svm_scale.class -#JAVAC = jikes -JAVAC_FLAGS = -target 1.5 -source 1.5 -JAVAC = javac -# JAVAC_FLAGS = +JAVA_TARGETDIR=${INSTDIR}/share/libsvm/java +JAVA_DOCDIR=${INSTDIR}/share/javadoc/libsvm-${LIBSVM_VER} +CLASSPATH = . +JAVAC_FLAGS = -target 1.5 -source 1.5 -classpath ${CLASSPATH} + +ifndef JAVAC +JAVAC=javac +endif + +ifndef JAR +JAR=jar +endif + all: $(FILES) - jar cvf libsvm.jar *.class libsvm/*.class + ${JAR} cvf libsvm.jar *.class libsvm/*.class .java.class: $(JAVAC) $(JAVAC_FLAGS) $< @@ -17,8 +26,22 @@ all: $(FILES) libsvm/svm.java: libsvm/svm.m4 m4 libsvm/svm.m4 > libsvm/svm.java +javadoc: + javadoc -d docs *.java libsvm/*.java + +install: + mkdir -p ${JAVA_TARGETDIR} + install -m 644 libsvm.jar ${JAVA_TARGETDIR} + install -m 644 test_applet.html ${JAVA_TARGETDIR} +# mkdir -p ${JAVA_DOCDIR} +# cd docs; cp -R * ${JAVA_DOCDIR} +uninstall: + rm -fr ${JAVA_TARGETDIR} + rm -fr ${JAVA_DOCDIR} + clean: rm -f libsvm/*.class *.class *.jar libsvm/*~ *~ libsvm/svm.java + rm -rf docs dist: clean all rm *.class libsvm/*.class diff -up ./java/svm_predict.java.orig ./java/svm_predict.java diff -up ./java/svm_scale.java.orig ./java/svm_scale.java diff -up ./java/svm_toy.java.orig ./java/svm_toy.java --- ./java/svm_toy.java.orig 2007-07-01 23:02:51.000000000 +1000 +++ ./java/svm_toy.java 2008-04-29 15:48:00.000000000 +1000 @@ -6,7 +6,7 @@ import java.awt.event.*; import java.io.*; public class svm_toy extends Applet { - + static final long serialVersionUID = -8325676470152687806L; static final String DEFAULT_PARAM="-t 2 -c 100"; int XLEN; int YLEN; @@ -453,6 +453,7 @@ public class svm_toy extends Applet { } class AppletFrame extends Frame { + static final long serialVersionUID = -8428435143024670779L; AppletFrame(String title, Applet applet, int width, int height) { super(title); diff -up ./java/svm_train.java.orig ./java/svm_train.java diff -up ./java/test_applet.html.orig ./java/test_applet.html --- ./java/test_applet.html.orig 2003-07-12 14:06:55.000000000 +1000 +++ ./java/test_applet.html 2008-04-29 15:48:00.000000000 +1000 @@ -1 +1,3 @@ - + + + diff -up ./Makefile.orig ./Makefile --- ./Makefile.orig 2007-10-14 16:29:12.000000000 +1000 +++ ./Makefile 2008-04-29 15:48:00.000000000 +1000 @@ -1,15 +1,109 @@ CXX? = g++ CFLAGS = -Wall -O3 +MAKE = make +LIBSVM_VER=${LIBSVM_VER_MAJOR}.${LIBSVM_VER_MINOR} +DOT_LIBS=.libs +LIBS= -L${DOT_LIBS} -lsvm -all: svm-train svm-predict svm-scale +export LIBSVM_VER -svm-predict: svm-predict.c svm.o - $(CXX) $(CFLAGS) svm-predict.c svm.o -o svm-predict -lm -svm-train: svm-train.c svm.o - $(CXX) $(CFLAGS) svm-train.c svm.o -o svm-train -lm -svm-scale: svm-scale.c - $(CXX) $(CFLAGS) svm-scale.c -o svm-scale -svm.o: svm.cpp svm.h - $(CXX) $(CFLAGS) -c svm.cpp +ifndef DESTDIR +INSTDIR=/usr +else +INSTDIR=${DESTDIR}/usr +endif + +export INSTDIR + +IS_64=$(shell /bin/uname -i | awk '/64/ {print 64}') + +ifndef LIBDIR +LIB_INSTDIR=${INSTDIR}/lib${IS_64} +else +LIB_INSTDIR=${INSTDIR}/..${LIBDIR} +endif + +ifndef LIBDIR +LIBDIR=/usr/lib${IS_64} +endif + +export LIBDIR +export LIB_INSTDIR + +all: svm-train svm-predict svm-scale svm-python svm-java svm-lib svm-toy-gtk svm-toy-qt + +svm-lib: %{DOT_LIBS}/libsvm.so + +%{DOT_LIBS}/libsvm.so: svm-share.o + $(CXX) -shared -Wl,-soname,libsvm.so.${LIBSVM_VER_MAJOR}\ + -o libsvm.so.${LIBSVM_VER} svm-share.o -lm + mkdir -p .libs + cd ${DOT_LIBS}; ln -sf ../libsvm.so.${LIBSVM_VER} libsvm.so +svm-share.o: svm.cpp svm.h + $(CXX) -g -fPIC $(CFLAGS) -c svm.cpp -o svm-share.o +svm-predict: svm-predict.c %{DOT_LIBS}/libsvm.so + $(CXX) $(CFLAGS) svm-predict.c -o svm-predict $(LIBS) -lm +svm-train: svm-train.c %{DOT_LIBS}/libsvm.so + $(CXX) $(CFLAGS) svm-train.c -o svm-train $(LIBS) -lm +svm-scale: svm-scale.c %{DOT_LIBS}/libsvm.so + $(CXX) $(CFLAGS) svm-scale.c -o svm-scale $(LIBS) +#svm.o: svm.cpp svm.h +# $(CXX) $(CFLAGS) -c svm.cpp clean: - rm -f *~ svm.o svm-train svm-predict svm-scale + rm -f *~ svm.o svm-train svm-predict svm-scale svm-toy/gtk/svm-toy-gtk svm-toy/qt/svm-toy-qt + ${MAKE} -C python clean + ${MAKE} -C java clean +svm-python: + ${MAKE} -C python +svm-java: + ${MAKE} -C java +svm-toy-gtk: + ${MAKE} -C svm-toy/gtk +svm-toy-qt: + ${MAKE} -C svm-toy/qt + +install: all + mkdir -p ${INSTDIR}/bin + install -m 755 svm-train ${INSTDIR}/bin + install -m 755 svm-predict ${INSTDIR}/bin + install -m 755 svm-scale ${INSTDIR}/bin + mkdir -p ${LIB_INSTDIR} + install -m 755 libsvm.so.${LIBSVM_VER} ${LIB_INSTDIR} + /sbin/ldconfig -n ${LIB_INSTDIR} + cd ${LIB_INSTDIR}; ln -fs libsvm.so.${LIBSVM_VER_MAJOR} libsvm.so +# install package libsvm-devel + mkdir -p ${INSTDIR}/include/libsvm + install -m 644 svm.h ${INSTDIR}/include/libsvm + mkdir -p ${INSTDIR}/share/libsvm/src/java/libsvm + install -m 644 *.h ${INSTDIR}/share/libsvm/src + install -m 644 *.c ${INSTDIR}/share/libsvm/src + install -m 644 *.cpp ${INSTDIR}/share/libsvm/src + install -m 644 Makefile ${INSTDIR}/share/libsvm/src + install -m 644 java/*.java ${INSTDIR}/share/libsvm/src/java + install -m 644 java/Makefile ${INSTDIR}/share/libsvm/src/java + install -m 644 java/libsvm/*.java ${INSTDIR}/share/libsvm/src/java/libsvm + install -m 644 java/libsvm/*.m4 ${INSTDIR}/share/libsvm/src/java/libsvm +# install package libsvm-python + ${MAKE} -C python install +# install package libsvm-java + ${MAKE} -C java install +# install package svm-toy + install -m 755 svm-toy/gtk/svm-toy-gtk ${INSTDIR}/bin + install -m 755 svm-toy/qt/svm-toy-qt ${INSTDIR}/bin +# install examples + mkdir -p ${INSTDIR}/share/libsvm/examples + install -m 644 heart_scale ${INSTDIR}/share/libsvm/examples +uninstall: + rm -f ${INSTDIR}/bin/svm-train + rm -f ${INSTDIR}/bin/svm-predict + rm -f ${INSTDIR}/bin/svm-scale + rm -fr ${INSTDIR}/libsvm/examples + rm -f ${INSTDIR}/include/libsvm/svm.h + rm -f ${LIB_INSTDIR}/libsvm/svm.o + rm -fr ${INSTDIR}/libsvm/src + rm -fr ${INSTDIR}/libsvm + ${MAKE} -C python uninstall + ${MAKE} -C java uninstall + rm -f ${INSTDIR}/bin/svm-toy-gtk + rm -f ${INSTDIR}/bin/svm-toy-qt + diff -up ./python/cross_validation.py.orig ./python/cross_validation.py diff -up ./python/Makefile.orig ./python/Makefile --- ./python/Makefile.orig 2007-10-14 16:29:12.000000000 +1000 +++ ./python/Makefile 2008-04-29 15:48:00.000000000 +1000 @@ -2,9 +2,16 @@ CXX? = g++ SWIG ?= swig #Windows: see ../README ../Makefile.win -PYTHON_INCLUDEDIR ?= /usr/include/python2.4 +#PYTHON_TEMP:=${shell mktemp} +#PYTHON_VERSION:=${shell python -V 2> ${PYTHON_TEMP} ; cat ${PYTHON_TEMP} | awk 'BEGIN {FS= "[ .]"} {printf("%s.%s",$$2,$$3)}'; rm -f ${PYTHON_TEMP}} +ifndef PYTHON_INCLUDEDIR -CFLAGS = -O3 -I$(PYTHON_INCLUDEDIR) -I.. +PYTHON_INCLUDEDIR?= /usr/include/python${PYTHON_VERSION} + +endif +PYTHON_TARGETDIR=${LIB_INSTDIR}/python${PYTHON_VERSION}/site-packages/libsvm + +CFLAGS_PYTHON = ${CFLAGS} -O3 -I$(PYTHON_INCLUDEDIR) -I.. LDFLAGS = -shared # Mac OS # LDFLAGS = -framework Python -bundle @@ -15,16 +22,34 @@ svmc.so: svmc_wrap.o svm.o $(CXX) $(LDFLAGS) -o svmc.so svmc_wrap.o svm.o svmc_wrap.o: svmc_wrap.c ../svm.h - $(CXX) $(CFLAGS) -fPIC -c svmc_wrap.c +# echo "PYTHON_VERSION=${PYTHON_VERSION}" +# echo "CFLAGS=${CFLAGS}" +# echo "CFLAGS_PYTHON=${CFLAGS_PYTHON}" + $(CXX) $(CFLAGS_PYTHON) -fPIC -c svmc_wrap.c svmc_wrap.c: svmc.i $(SWIG) -python -noproxy svmc.i svm.o: ../svm.cpp ../svm.h - $(CXX) $(CFLAGS) -fPIC -c ../svm.cpp + $(CXX) $(CFLAGS_PYTHON) -fPIC -c ../svm.cpp clean: rm -f *~ *.o *.so *.pyc *.pyo svm.o moreclean: clean rm -f svmc_wrap.c + + +install: all + mkdir -p ${PYTHON_TARGETDIR} + install -m 755 cross_validation.py ${PYTHON_TARGETDIR} + install -m 644 svm.py ${PYTHON_TARGETDIR} + install -m 755 svm_test.py ${PYTHON_TARGETDIR} + install -m 755 test_cross_validation.py ${PYTHON_TARGETDIR} + install -m 644 *.i ${PYTHON_TARGETDIR} + install -m 755 *.so ${PYTHON_TARGETDIR} + install -m 755 ../tools/*.py ${PYTHON_TARGETDIR} + +uninstall: + rm -fr ${LIBDIR}/python${PYTHON_VERSION}/site-packages/libsvm + diff -up ./python/svmc_wrap.c.orig ./python/svmc_wrap.c diff -up ./python/svm.py.orig ./python/svm.py diff -up ./python/svm_test.py.orig ./python/svm_test.py diff -up ./python/test_cross_validation.py.orig ./python/test_cross_validation.py diff -up ./svm.cpp.orig ./svm.cpp diff -up ./svm.h.orig ./svm.h diff -up ./svm-predict.c.orig ./svm-predict.c diff -up ./svm-scale.c.orig ./svm-scale.c diff -up ./svm-toy/gtk/callbacks.cpp.orig ./svm-toy/gtk/callbacks.cpp --- ./svm-toy/gtk/callbacks.cpp.orig 2006-03-04 17:40:12.000000000 +1000 +++ ./svm-toy/gtk/callbacks.cpp 2008-04-29 15:48:00.000000000 +1000 @@ -2,6 +2,7 @@ #include #include #include +#include #include "callbacks.h" #include "interface.h" #include "../../svm.h" diff -up ./svm-toy/gtk/callbacks.h.orig ./svm-toy/gtk/callbacks.h diff -up ./svm-toy/gtk/interface.c.orig ./svm-toy/gtk/interface.c diff -up ./svm-toy/gtk/interface.h.orig ./svm-toy/gtk/interface.h diff -up ./svm-toy/gtk/main.c.orig ./svm-toy/gtk/main.c diff -up ./svm-toy/gtk/Makefile.orig ./svm-toy/gtk/Makefile --- ./svm-toy/gtk/Makefile.orig 2007-10-14 16:29:12.000000000 +1000 +++ ./svm-toy/gtk/Makefile 2008-04-29 15:48:00.000000000 +1000 @@ -1,22 +1,28 @@ CC? = gcc CXX? = g++ -CFLAGS = -Wall -O3 -g `gtk-config --cflags` -LIBS = `gtk-config --libs` +#CFLAGS = -Wall -O3 -g `gtk-config --cflags` +#LIBS = `gtk-config --libs` +COPT = `pkg-config --cflags --libs gtk+-2.0` +DOT_LIBS=../../.libs +LIBS= -L${DOT_LIBS} -lsvm -svm-toy: main.o interface.o callbacks.o ../../svm.o - $(CXX) $(CFLAGS) main.o interface.o callbacks.o ../../svm.o -o svm-toy $(LIBS) + +all: svm-toy-gtk + +svm-toy-gtk: main.o interface.o callbacks.o + $(CXX) $(COPT) main.o interface.o callbacks.o ${LIBS} -o svm-toy-gtk main.o: main.c - $(CC) $(CFLAGS) -c main.c + $(CC) $(COPT) -c main.c interface.o: interface.c interface.h - $(CC) $(CFLAGS) -c interface.c + $(CC) $(COPT) -c interface.c callbacks.o: callbacks.cpp callbacks.h - $(CXX) $(CFLAGS) -c callbacks.cpp + $(CXX) $(COPT) -c callbacks.cpp -../../svm.o: - cd ../..; make svm.o +#../../svm.o: +# cd ../..; make svm.o clean: - rm -f *~ callbacks.o svm-toy main.o interface.o callbacks.o ../../svm.o + rm -f *~ callbacks.o svm-toy main.o interface.o callbacks.o diff -up ./svm-toy/qt/Makefile.orig ./svm-toy/qt/Makefile --- ./svm-toy/qt/Makefile.orig 2007-10-14 16:29:12.000000000 +1000 +++ ./svm-toy/qt/Makefile 2008-04-29 16:29:15.000000000 +1000 @@ -1,19 +1,50 @@ CXX? = g++ -CFLAGS = -Wall -O3 -DQT_THREAD_SUPPORT -BIN = $(QTDIR)/bin -INCLUDE = $(QTDIR)/include -LIB = $(QTDIR)/lib -#BIN = /usr/bin -#INCLUDE = /usr/include/qt3 -#LIB = /usr/lib/qt3 +CFLAGS = -Wall -O3 +#LIBDIR?=/usr/lib64 +#QT4_DIR= +QT4_DIR:= $(shell if [ -e ${LIBDIR}/pkgconfig/Qt3Support.pc ]; then echo ${LIBDIR}/qt4; fi) -svm-toy: svm-toy.cpp svm-toy.moc ../../svm.o - $(CXX) -I$(INCLUDE) $(CFLAGS) svm-toy.cpp ../../svm.o -o svm-toy -L$(LIB) -lqt-mt +ifdef QT4_DIR + QTDIR:=${QT4_DIR} + BIN := ${QTDIR}/bin + FLAGS:=${CFLAGS} -I/usr/include/Qt -DQT3_SUPPORT -DQT_INCLUDE_COMPAT `pkg-config --cflags --libs Qt3Support QtGui` + QT3_TO_4:=$(shell if [ -e "${BIN}/qt3to4" ]; then echo "${BIN}/qt3to4"; fi) + ifndef QT3_TO_4 + QT3_TO_4:=$(shell if [ -e /usr/bin/qt3to4 ]; then echo /usr/bin/qt3to4; fi) + endif +else + QTDIR:=${LIBDIR}/qt-3.3 + BIN := ${QTDIR}/bin + FLAGS:=${CFLAGS} `pkg-config --cflags --libs qt-mt` +endif + + +DOT_LIBS=../../.libs +LIBS= -L${DOT_LIBS} -lsvm + +all: svm-toy-qt + +svm-toy-qt: svm-toy.new.cpp svm-toy.moc ../../svm.o + $(CXX) $(FLAGS) svm-toy.new.cpp ../../svm.o -o svm-toy-qt $(LIBS) # add -pthread for bsd -svm-toy.moc: svm-toy.cpp - $(BIN)/moc svm-toy.cpp -o svm-toy.moc -../../svm.o: - cd ../..; make svm.o + +svm-toy.moc: svm-toy.new.cpp + echo "QT4_DIR=${QT4_DIR}" + echo "QTDIR=${QTDIR}" + echo "BIN=${BIN}" +# echo "LIBDIR=${LIBDIR}" +# echo "FLAGS=${FLAGS}" + ${BIN}/moc svm-toy.new.cpp -o svm-toy.moc +#../../svm.o: +# cd ../..; make svm.o + +svm-toy.new.cpp: svm-toy.cpp + cp svm-toy.cpp svm-toy.new.cpp +ifdef QT3_TO_4 + echo "QT3_TO_4=${QT3_TO_4}" + ${QT3_TO_4} -alwaysOverwrite svm-toy.new.cpp +endif + clean: - rm -f *~ svm-toy svm-toy.moc ../../svm.o + rm -f *~ svm-toy-qt svm-toy.moc ../../svm.o svm-toy.new.cpp diff -up ./svm-toy/qt/svm-toy.cpp.orig ./svm-toy/qt/svm-toy.cpp --- ./svm-toy/qt/svm-toy.cpp.orig 2006-03-04 17:40:12.000000000 +1000 +++ ./svm-toy/qt/svm-toy.cpp 2008-04-29 16:13:32.000000000 +1000 @@ -67,14 +67,15 @@ private: void clear_all() { point_list.clear(); - buffer.fill(black); - paintEvent(NULL); + buffer.fill(Qt::black); + repaint(FALSE); } void draw_point(const point& p) { const QPixmap& icon = choose_icon(p.value); - window_painter.drawPixmap((int)(p.x*XLEN),(int)(p.y*YLEN),icon); + buffer_painter.drawPixmap((int)(p.x*XLEN),(int)(p.y*YLEN),icon); + repaint(FALSE); } void draw_all_points() { @@ -213,33 +214,23 @@ private slots: buffer_painter.setPen(colors[0]); buffer_painter.drawLine(0,0,0,YLEN-1); - window_painter.setPen(colors[0]); - window_painter.drawLine(0,0,0,YLEN-1); int p = (int)(param.p * YLEN); for(i = 1; i < XLEN; i++) { buffer_painter.setPen(colors[0]); buffer_painter.drawLine(i,0,i,YLEN-1); - window_painter.setPen(colors[0]); - window_painter.drawLine(i,0,i,YLEN-1); buffer_painter.setPen(colors[5]); buffer_painter.drawLine(i-1,j[i-1],i,j[i]); - window_painter.setPen(colors[5]); - window_painter.drawLine(i-1,j[i-1],i,j[i]); if(param.svm_type == EPSILON_SVR) { buffer_painter.setPen(colors[2]); buffer_painter.drawLine(i-1,j[i-1]+p,i,j[i]+p); - window_painter.setPen(colors[2]); - window_painter.drawLine(i-1,j[i-1]+p,i,j[i]+p); buffer_painter.setPen(colors[2]); buffer_painter.drawLine(i-1,j[i-1]-p,i,j[i]-p); - window_painter.setPen(colors[2]); - window_painter.drawLine(i-1,j[i-1]-p,i,j[i]-p); } } @@ -281,9 +272,7 @@ private slots: double d = svm_predict(model, x); if (param.svm_type == ONE_CLASS && d<0) d=2; buffer_painter.setPen(colors[(int)d]); - window_painter.setPen(colors[(int)d]); buffer_painter.drawPoint(i,j); - window_painter.drawPoint(i,j); } svm_destroy_model(model); @@ -352,9 +341,9 @@ SvmToyWindow::SvmToyWindow() ,current_value(1) { buffer.resize(XLEN,YLEN); - buffer.fill(black); + buffer.fill(Qt::black); - window_painter.begin(this); +// window_painter.begin(this); buffer_painter.begin(&buffer); QObject::connect(&button_change_icon, SIGNAL(clicked()), this, @@ -371,7 +360,7 @@ SvmToyWindow::SvmToyWindow() SLOT(button_run_clicked())); // don't blank the window before repainting - setBackgroundMode( NoBackground ); + setBackgroundMode( Qt::NoBackground ); icon1.resize(4,4); icon2.resize(4,4); @@ -403,7 +392,7 @@ SvmToyWindow::SvmToyWindow() SvmToyWindow::~SvmToyWindow() { - window_painter.end(); +// window_painter.end(); buffer_painter.end(); } @@ -417,7 +406,9 @@ void SvmToyWindow::mousePressEvent( QMou void SvmToyWindow::paintEvent( QPaintEvent* ) { // copy the image from the buffer pixmap to the window - bitBlt( this, 0, 0, &buffer ); + // Compatiable both Qt-3 and Qt-4 + QPainter p(this); + p.drawPixmap(0, 0, buffer); } int main( int argc, char* argv[] ) diff -up ./svm-toy/windows/svm-toy.cpp.orig ./svm-toy/windows/svm-toy.cpp diff -up ./svm-train.c.orig ./svm-train.c diff -up ./tools/checkdata.py.orig ./tools/checkdata.py diff -up ./tools/easy.py.orig ./tools/easy.py --- ./tools/easy.py.orig 2008-02-10 22:12:43.000000000 +1000 +++ ./tools/easy.py 2008-04-29 15:48:00.000000000 +1000 @@ -2,6 +2,7 @@ import sys import os +from distutils.sysconfig import get_python_lib from subprocess import * if len(sys.argv) <= 1: @@ -12,10 +13,10 @@ if len(sys.argv) <= 1: is_win32 = (sys.platform == 'win32') if not is_win32: - svmscale_exe = "../svm-scale" - svmtrain_exe = "../svm-train" - svmpredict_exe = "../svm-predict" - grid_py = "./grid.py" + svmscale_exe = "/usr/bin/svm-scale" + svmtrain_exe = "/usr/bin/svm-train" + svmpredict_exe = "/usr/bin/svm-predict" + grid_py = get_python_lib(1)+"/libsvm/grid.py" gnuplot_exe = "/usr/bin/gnuplot" else: # example for windows diff -up ./tools/grid.py.orig ./tools/grid.py --- ./tools/grid.py.orig 2008-03-10 00:33:09.000000000 +1000 +++ ./tools/grid.py 2008-04-29 15:48:00.000000000 +1000 @@ -11,7 +11,7 @@ from subprocess import * 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 @@ -88,6 +88,7 @@ Usage: grid.py [-log2c begin,end,step] [ i = i + 1 pass_through_string = join(pass_through_options," ") + print 'dataset_pathname=%s' % dataset_pathname assert os.path.exists(svmtrain_exe),"svm-train executable not found" assert os.path.exists(gnuplot_exe),"gnuplot executable not found" assert os.path.exists(dataset_pathname),"dataset not found" diff -up ./tools/subset.py.orig ./tools/subset.py