On Wed, Sep 24, 2008 at 8:42 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have a question about libsvm using under Sage. I have downloaded
> libsvm (a Support Vector Machine classification library) which comes
> with a python interface.
>
> I did build the sources as follows :
>
> [EMAIL PROTECTED]:~/actuel/recherche/libs/libsvm-2.86/python$ ll
> total 208
> -rw-r--r-- 1 jlandre jlandre   1140 2004-03-24 12:44
> cross_validation.py
> -rw-r--r-- 1 jlandre jlandre    582 2007-10-14 08:29 Makefile
> -rw-r--r-- 1 jlandre jlandre   5023 2008-02-19 00:09 README
> -rw-r--r-- 1 jlandre jlandre   2731 2007-03-31 02:31 svmc.i
> -rw-r--r-- 1 jlandre jlandre 169031 2007-03-31 02:31 svmc_wrap.c
> -rw-r--r-- 1 jlandre jlandre   8140 2006-12-08 15:37 svm.py
> -rwxr-xr-x 1 jlandre jlandre   2110 2006-07-28 02:09 svm_test.py
> -rwxr-xr-x 1 jlandre jlandre    630 2003-07-12 06:07
> test_cross_validation.py
> [EMAIL PROTECTED]:~/actuel/recherche/libs/libsvm-2.86/python$ make
> PYTHON_INCLUDEDIR=/usr/local/sage/sage/local/include/python2.5 all
> g++ -O3 -I/usr/local/sage/sage/local/include/python2.5 -I.. -fPIC -c
> svmc_wrap.c
> g++ -O3 -I/usr/local/sage/sage/local/include/python2.5 -I.. -fPIC -
> c ../svm.cpp
> g++ -shared -o svmc.so svmc_wrap.o svm.o
> [EMAIL PROTECTED]:~/actuel/recherche/libs/libsvm-2.86/python$ ll
> total 648
> -rw-r--r-- 1 jlandre jlandre   1140 2004-03-24 12:44
> cross_validation.py
> -rw-r--r-- 1 jlandre jlandre    582 2007-10-14 08:29 Makefile
> -rw-r--r-- 1 jlandre jlandre   5023 2008-02-19 00:09 README
> -rw-r--r-- 1 jlandre jlandre   2731 2007-03-31 02:31 svmc.i
> -rwxr-xr-x 1 jlandre jlandre 160033 2008-09-24 17:30 svmc.so
> -rw-r--r-- 1 jlandre jlandre 169031 2007-03-31 02:31 svmc_wrap.c
> -rw-r--r-- 1 jlandre jlandre 180992 2008-09-24 17:30 svmc_wrap.o
> -rw-r--r-- 1 jlandre jlandre  89912 2008-09-24 17:30 svm.o
> -rw-r--r-- 1 jlandre jlandre   8140 2006-12-08 15:37 svm.py
> -rwxr-xr-x 1 jlandre jlandre   2110 2006-07-28 02:09 svm_test.py
> -rwxr-xr-x 1 jlandre jlandre    630 2003-07-12 06:07
> test_cross_validation.py
>
> As you can see, I passed the path of the Sage python installation to
> the Makefile and everything was OK.
>
> I obtain a library file named "svmc.so". My question is where do I
> have to put it under the Sage directory in order to use it ?

What happens if -- from the same directory that svmc.so is in -- you
run Sage and type

   sage: import svmc
   sage: svmc.[press the tab key]
   sage: help(svmc)
   sage: dir(svmc)

>
> Thanks in advance for your nice reply, have a nice day wherever you
> are in the world...
>
> Regards,
>
> Jérôme Landré
> University of Reims-Champagne-Ardenne
> France
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to