Commit 6cc01259 authored by André Anjos's avatar André Anjos 💬

xbob -> bob

parent b87776ef
...@@ -26,8 +26,8 @@ install: ...@@ -26,8 +26,8 @@ install:
- "python bootstrap.py" - "python bootstrap.py"
- "CFLAGS=-coverage ./bin/buildout" - "CFLAGS=-coverage ./bin/buildout"
script: script:
- "./bin/python -c 'from xbob.learn.libsvm import get_config; print(get_config())'" - "./bin/python -c 'from bob.learn.libsvm import get_config; print(get_config())'"
- "./bin/coverage run --source=xbob.learn.libsvm ./bin/nosetests -sv" - "./bin/coverage run --source=bob.learn.libsvm ./bin/nosetests -sv"
- "./bin/sphinx-build -b doctest doc sphinx" - "./bin/sphinx-build -b doctest doc sphinx"
- "./bin/sphinx-build -b html doc sphinx" - "./bin/sphinx-build -b html doc sphinx"
after_success: after_success:
......
include LICENSE README.rst bootstrap.py buildout.cfg include LICENSE README.rst bootstrap.py buildout.cfg
recursive-include doc conf.py doxygen.rc *.rst recursive-include doc conf.py doxygen.rc *.rst
recursive-include xbob/learn/libsvm *.cpp *.h recursive-include bob/learn/libsvm *.cpp *.h
recursive-include xbob/learn/libsvm/data *.* recursive-include bob/learn/libsvm/data *.*
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
.. Andre Anjos <andre.anjos@idiap.ch> .. Andre Anjos <andre.anjos@idiap.ch>
.. Fri 13 Dec 2013 12:35:22 CET .. Fri 13 Dec 2013 12:35:22 CET
.. image:: https://travis-ci.org/bioidiap/xbob.learn.libsvm.svg?branch=master .. image:: https://travis-ci.org/bioidiap/bob.learn.libsvm.svg?branch=master
:target: https://travis-ci.org/bioidiap/xbob.learn.libsvm :target: https://travis-ci.org/bioidiap/bob.learn.libsvm
.. image:: https://coveralls.io/repos/bioidiap/xbob.learn.libsvm/badge.png .. image:: https://coveralls.io/repos/bioidiap/bob.learn.libsvm/badge.png
:target: https://coveralls.io/r/bioidiap/xbob.learn.libsvm :target: https://coveralls.io/r/bioidiap/bob.learn.libsvm
.. image:: http://img.shields.io/github/tag/bioidiap/xbob.learn.libsvm.png .. image:: http://img.shields.io/github/tag/bioidiap/bob.learn.libsvm.png
:target: https://github.com/bioidiap/xbob.learn.libsvm :target: https://github.com/bioidiap/bob.learn.libsvm
.. image:: http://img.shields.io/pypi/v/xbob.learn.libsvm.png .. image:: http://img.shields.io/pypi/v/bob.learn.libsvm.png
:target: https://pypi.python.org/pypi/xbob.learn.libsvm :target: https://pypi.python.org/pypi/bob.learn.libsvm
.. image:: http://img.shields.io/pypi/dm/xbob.learn.libsvm.png .. image:: http://img.shields.io/pypi/dm/bob.learn.libsvm.png
:target: https://pypi.python.org/pypi/xbob.learn.libsvm :target: https://pypi.python.org/pypi/bob.learn.libsvm
================================ ================================
Bob-Python bindings for LIBSVM Bob-Python bindings for LIBSVM
...@@ -28,8 +28,8 @@ automatically. You can just skip to the installation instructions. ...@@ -28,8 +28,8 @@ automatically. You can just skip to the installation instructions.
In case you have installed ``LIBSVM`` on a non-standard location (e.g. your In case you have installed ``LIBSVM`` on a non-standard location (e.g. your
home directory), then you can specify the path to the root of that installation home directory), then you can specify the path to the root of that installation
using the environment variable ``XBOB_PREFIX_PATH``, **before** building and using the environment variable ``BOB_PREFIX_PATH``, **before** building and
installing the package. For example, if ``XBOB_PREFIX_PATH`` is set to installing the package. For example, if ``BOB_PREFIX_PATH`` is set to
``/home/user/libsvm-3.12``, then we will search for the header file ``svm.h`` ``/home/user/libsvm-3.12``, then we will search for the header file ``svm.h``
in ``/home/user/libsvm-3.12/include`` and expect that the library file file is in ``/home/user/libsvm-3.12/include`` and expect that the library file file is
found under ``/home/user/libsvm-3.12/lib``. found under ``/home/user/libsvm-3.12/lib``.
...@@ -37,11 +37,11 @@ found under ``/home/user/libsvm-3.12/lib``. ...@@ -37,11 +37,11 @@ found under ``/home/user/libsvm-3.12/lib``.
If you are installing this package via ``pip`` for example, just set the If you are installing this package via ``pip`` for example, just set the
environment variable like this:: environment variable like this::
$ XBOB_PREFIX_PATH=/home/user/libsvm-3.12 pip install xbob.learn.libsvm $ BOB_PREFIX_PATH=/home/user/libsvm-3.12 pip install bob.learn.libsvm
If you are installing this package via ``zc.buildout``, we recommend you use If you are installing this package via ``zc.buildout``, we recommend you use
our `xbob.buildout <http://pypi.python.org/pypi/xbob.buildout>`_ extension and our `bob.buildout <http://pypi.python.org/pypi/bob.buildout>`_ extension and
set the ``[environ]`` section to define ``XBOB_PREFIX_PATH``. set the ``[environ]`` section to define ``BOB_PREFIX_PATH``.
Installation Installation
------------ ------------
...@@ -65,7 +65,7 @@ Testing ...@@ -65,7 +65,7 @@ Testing
You can run a set of tests using the nose test runner:: You can run a set of tests using the nose test runner::
$ nosetests -sv xbob.learn.libsvm $ nosetests -sv bob.learn.libsvm
.. warning:: .. warning::
...@@ -82,7 +82,7 @@ You can run our documentation tests using sphinx itself:: ...@@ -82,7 +82,7 @@ You can run our documentation tests using sphinx itself::
You can test overall test coverage with:: You can test overall test coverage with::
$ nosetests --with-coverage --cover-package=xbob.learn.libsvm $ nosetests --with-coverage --cover-package=bob.learn.libsvm
The ``coverage`` egg must be installed for this to work properly. The ``coverage`` egg must be installed for this to work properly.
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland * Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland
*/ */
#include <xbob.learn.libsvm/file.h> #include <bob.learn.libsvm/file.h>
#include <boost/format.hpp> #include <boost/format.hpp>
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
* @author Andre Anjos <andre.anjos@idiap.ch> * @author Andre Anjos <andre.anjos@idiap.ch>
* @date Tue 25 Mar 2014 12:57:21 CET * @date Tue 25 Mar 2014 12:57:21 CET
* *
* @brief General directives for all modules in xbob.learn.libsvm * @brief General directives for all modules in bob.learn.libsvm
*/ */
#ifndef XBOB_LEARN_LIBSVM_CONFIG_H #ifndef BOB_LEARN_LIBSVM_CONFIG_H
#define XBOB_LEARN_LIBSVM_CONFIG_H #define BOB_LEARN_LIBSVM_CONFIG_H
/* Macros that define versions and important names */ /* Macros that define versions and important names */
#define XBOB_LEARN_LIBSVM_API_VERSION 0x0200 #define BOB_LEARN_LIBSVM_API_VERSION 0x0200
#endif /* XBOB_LEARN_LIBSVM_CONFIG_H */ #endif /* BOB_LEARN_LIBSVM_CONFIG_H */
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Copyright (C) 2011-2013 Idiap Research Institute, Martigny, Switzerland * Copyright (C) 2011-2013 Idiap Research Institute, Martigny, Switzerland
*/ */
#include <xbob.learn.libsvm/machine.h> #include <bob.learn.libsvm/machine.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <boost/format.hpp> #include <boost/format.hpp>
......
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
* @brief Bindings to bob::machine * @brief Bindings to bob::machine
*/ */
#define XBOB_LEARN_LIBSVM_MODULE #define BOB_LEARN_LIBSVM_MODULE
#include <xbob.learn.libsvm/api.h> #include <bob.learn.libsvm/api.h>
#ifdef NO_IMPORT_ARRAY #ifdef NO_IMPORT_ARRAY
#undef NO_IMPORT_ARRAY #undef NO_IMPORT_ARRAY
#endif #endif
#include <xbob.blitz/capi.h> #include <bob.blitz/capi.h>
#include <xbob.blitz/cleanup.h> #include <bob.blitz/cleanup.h>
#include <xbob.io.base/api.h> #include <bob.io.base/api.h>
static PyMethodDef module_methods[] = { static PyMethodDef module_methods[] = {
{0} /* Sentinel */ {0} /* Sentinel */
...@@ -21,12 +21,12 @@ static PyMethodDef module_methods[] = { ...@@ -21,12 +21,12 @@ static PyMethodDef module_methods[] = {
PyDoc_STRVAR(module_docstr, "bob::learn::libsvm's machine and trainers"); PyDoc_STRVAR(module_docstr, "bob::learn::libsvm's machine and trainers");
int PyXbobLearnLibsvm_APIVersion = XBOB_LEARN_LIBSVM_API_VERSION; int PyBobLearnLibsvm_APIVersion = BOB_LEARN_LIBSVM_API_VERSION;
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
static PyModuleDef module_definition = { static PyModuleDef module_definition = {
PyModuleDef_HEAD_INIT, PyModuleDef_HEAD_INIT,
XBOB_EXT_MODULE_NAME, BOB_EXT_MODULE_NAME,
module_docstr, module_docstr,
-1, -1,
module_methods, module_methods,
...@@ -48,14 +48,14 @@ static PyObject* create_module (void) { ...@@ -48,14 +48,14 @@ static PyObject* create_module (void) {
# if PY_VERSION_HEX >= 0x03000000 # if PY_VERSION_HEX >= 0x03000000
PyObject* m = PyModule_Create(&module_definition); PyObject* m = PyModule_Create(&module_definition);
# else # else
PyObject* m = Py_InitModule3(XBOB_EXT_MODULE_NAME, module_methods, module_docstr); PyObject* m = Py_InitModule3(BOB_EXT_MODULE_NAME, module_methods, module_docstr);
# endif # endif
if (!m) return 0; if (!m) return 0;
auto m_ = make_safe(m); auto m_ = make_safe(m);
/* register some constants */ /* register some constants */
if (PyModule_AddIntConstant(m, "__api_version__", XBOB_LEARN_LIBSVM_API_VERSION) < 0) return 0; if (PyModule_AddIntConstant(m, "__api_version__", BOB_LEARN_LIBSVM_API_VERSION) < 0) return 0;
if (PyModule_AddStringConstant(m, "__version__", XBOB_EXT_MODULE_VERSION) < 0) return 0; if (PyModule_AddStringConstant(m, "__version__", BOB_EXT_MODULE_VERSION) < 0) return 0;
/* register the types to python */ /* register the types to python */
Py_INCREF(&PyBobLearnLibsvmFile_Type); Py_INCREF(&PyBobLearnLibsvmFile_Type);
...@@ -67,7 +67,7 @@ static PyObject* create_module (void) { ...@@ -67,7 +67,7 @@ static PyObject* create_module (void) {
Py_INCREF(&PyBobLearnLibsvmTrainer_Type); Py_INCREF(&PyBobLearnLibsvmTrainer_Type);
if (PyModule_AddObject(m, "Trainer", (PyObject *)&PyBobLearnLibsvmTrainer_Type) < 0) return 0; if (PyModule_AddObject(m, "Trainer", (PyObject *)&PyBobLearnLibsvmTrainer_Type) < 0) return 0;
static void* PyXbobLearnLibsvm_API[PyXbobLearnLibsvm_API_pointers]; static void* PyBobLearnLibsvm_API[PyBobLearnLibsvm_API_pointers];
/* exhaustive list of C APIs */ /* exhaustive list of C APIs */
...@@ -75,75 +75,75 @@ static PyObject* create_module (void) { ...@@ -75,75 +75,75 @@ static PyObject* create_module (void) {
* Versioning * * Versioning *
**************/ **************/
PyXbobLearnLibsvm_API[PyXbobLearnLibsvm_APIVersion_NUM] = (void *)&PyXbobLearnLibsvm_APIVersion; PyBobLearnLibsvm_API[PyBobLearnLibsvm_APIVersion_NUM] = (void *)&PyBobLearnLibsvm_APIVersion;
/*************************************** /***************************************
* Bindings for xbob.learn.libsvm.File * * Bindings for bob.learn.libsvm.File *
***************************************/ ***************************************/
PyXbobLearnLibsvm_API[PyBobLearnLibsvmFile_Type_NUM] = (void *)&PyBobLearnLibsvmFile_Type; PyBobLearnLibsvm_API[PyBobLearnLibsvmFile_Type_NUM] = (void *)&PyBobLearnLibsvmFile_Type;
PyXbobLearnLibsvm_API[PyBobLearnLibsvmFile_Check_NUM] = (void *)&PyBobLearnLibsvmFile_Check; PyBobLearnLibsvm_API[PyBobLearnLibsvmFile_Check_NUM] = (void *)&PyBobLearnLibsvmFile_Check;
/****************************************** /******************************************
* Bindings for xbob.learn.libsvm.Machine * * Bindings for bob.learn.libsvm.Machine *
******************************************/ ******************************************/
PyXbobLearnLibsvm_API[PyBobLearnLibsvmMachine_Type_NUM] = (void *)&PyBobLearnLibsvmMachine_Type; PyBobLearnLibsvm_API[PyBobLearnLibsvmMachine_Type_NUM] = (void *)&PyBobLearnLibsvmMachine_Type;
PyXbobLearnLibsvm_API[PyBobLearnLibsvmMachine_Check_NUM] = (void *)&PyBobLearnLibsvmMachine_Check; PyBobLearnLibsvm_API[PyBobLearnLibsvmMachine_Check_NUM] = (void *)&PyBobLearnLibsvmMachine_Check;
PyXbobLearnLibsvm_API[PyBobLearnLibsvmMachine_NewFromMachine_NUM] = (void *)&PyBobLearnLibsvmMachine_NewFromMachine; PyBobLearnLibsvm_API[PyBobLearnLibsvmMachine_NewFromMachine_NUM] = (void *)&PyBobLearnLibsvmMachine_NewFromMachine;
/****************************************** /******************************************
* Bindings for xbob.learn.libsvm.Trainer * * Bindings for bob.learn.libsvm.Trainer *
******************************************/ ******************************************/
PyXbobLearnLibsvm_API[PyBobLearnLibsvmTrainer_Type_NUM] = (void *)&PyBobLearnLibsvmTrainer_Type; PyBobLearnLibsvm_API[PyBobLearnLibsvmTrainer_Type_NUM] = (void *)&PyBobLearnLibsvmTrainer_Type;
PyXbobLearnLibsvm_API[PyBobLearnLibsvmTrainer_Check_NUM] = (void *)&PyBobLearnLibsvmTrainer_Check; PyBobLearnLibsvm_API[PyBobLearnLibsvmTrainer_Check_NUM] = (void *)&PyBobLearnLibsvmTrainer_Check;
/********************************* /*********************************
* Bindings to general utilities * * Bindings to general utilities *
*********************************/ *********************************/
PyXbobLearnLibsvm_API[PyBobLearnLibsvm_MachineTypeAsString_NUM] = (void *)&PyBobLearnLibsvm_MachineTypeAsString; PyBobLearnLibsvm_API[PyBobLearnLibsvm_MachineTypeAsString_NUM] = (void *)&PyBobLearnLibsvm_MachineTypeAsString;
PyXbobLearnLibsvm_API[PyBobLearnLibsvm_StringAsMachineType_NUM] = (void *)&PyBobLearnLibsvm_StringAsMachineType; PyBobLearnLibsvm_API[PyBobLearnLibsvm_StringAsMachineType_NUM] = (void *)&PyBobLearnLibsvm_StringAsMachineType;
PyXbobLearnLibsvm_API[PyBobLearnLibsvm_CStringAsMachineType_NUM] = (void *)&PyBobLearnLibsvm_CStringAsMachineType; PyBobLearnLibsvm_API[PyBobLearnLibsvm_CStringAsMachineType_NUM] = (void *)&PyBobLearnLibsvm_CStringAsMachineType;
PyXbobLearnLibsvm_API[PyBobLearnLibsvm_KernelTypeAsString_NUM] = (void *)&PyBobLearnLibsvm_KernelTypeAsString; PyBobLearnLibsvm_API[PyBobLearnLibsvm_KernelTypeAsString_NUM] = (void *)&PyBobLearnLibsvm_KernelTypeAsString;
PyXbobLearnLibsvm_API[PyBobLearnLibsvm_StringAsKernelType_NUM] = (void *)&PyBobLearnLibsvm_StringAsKernelType; PyBobLearnLibsvm_API[PyBobLearnLibsvm_StringAsKernelType_NUM] = (void *)&PyBobLearnLibsvm_StringAsKernelType;
PyXbobLearnLibsvm_API[PyBobLearnLibsvm_CStringAsKernelType_NUM] = (void *)&PyBobLearnLibsvm_CStringAsKernelType; PyBobLearnLibsvm_API[PyBobLearnLibsvm_CStringAsKernelType_NUM] = (void *)&PyBobLearnLibsvm_CStringAsKernelType;
#if PY_VERSION_HEX >= 0x02070000 #if PY_VERSION_HEX >= 0x02070000
/* defines the PyCapsule */ /* defines the PyCapsule */
PyObject* c_api_object = PyCapsule_New((void *)PyXbobLearnLibsvm_API, PyObject* c_api_object = PyCapsule_New((void *)PyBobLearnLibsvm_API,
XBOB_EXT_MODULE_PREFIX "." XBOB_EXT_MODULE_NAME "._C_API", 0); BOB_EXT_MODULE_PREFIX "." BOB_EXT_MODULE_NAME "._C_API", 0);
#else #else
PyObject* c_api_object = PyCObject_FromVoidPtr((void *)PyXbobLearnLibsvm_API, 0); PyObject* c_api_object = PyCObject_FromVoidPtr((void *)PyBobLearnLibsvm_API, 0);
#endif #endif
if (c_api_object) PyModule_AddObject(m, "_C_API", c_api_object); if (c_api_object) PyModule_AddObject(m, "_C_API", c_api_object);
/* imports dependencies */ /* imports dependencies */
if (import_xbob_blitz() < 0) { if (import_bob_blitz() < 0) {
PyErr_Print(); PyErr_Print();
PyErr_Format(PyExc_ImportError, "cannot import `%s'", XBOB_EXT_MODULE_NAME); PyErr_Format(PyExc_ImportError, "cannot import `%s'", BOB_EXT_MODULE_NAME);
return 0; return 0;
} }
if (import_xbob_io_base() < 0) { if (import_bob_io_base() < 0) {
PyErr_Print(); PyErr_Print();
PyErr_Format(PyExc_ImportError, "cannot import `%s'", XBOB_EXT_MODULE_NAME); PyErr_Format(PyExc_ImportError, "cannot import `%s'", BOB_EXT_MODULE_NAME);
return 0; return 0;
} }
...@@ -152,7 +152,7 @@ static PyObject* create_module (void) { ...@@ -152,7 +152,7 @@ static PyObject* create_module (void) {
} }
PyMODINIT_FUNC XBOB_EXT_ENTRY_NAME (void) { PyMODINIT_FUNC BOB_EXT_ENTRY_NAME (void) {
# if PY_VERSION_HEX >= 0x03000000 # if PY_VERSION_HEX >= 0x03000000
return return
# endif # endif
......
...@@ -7,18 +7,18 @@ ...@@ -7,18 +7,18 @@
* Copyright (C) 2011-2013 Idiap Research Institute, Martigny, Switzerland * Copyright (C) 2011-2013 Idiap Research Institute, Martigny, Switzerland
*/ */
#define XBOB_LEARN_LIBSVM_MODULE #define BOB_LEARN_LIBSVM_MODULE
#include <xbob.blitz/cppapi.h> #include <bob.blitz/cppapi.h>
#include <xbob.blitz/cleanup.h> #include <bob.blitz/cleanup.h>
#include <xbob.io.base/api.h> #include <bob.io.base/api.h>
#include <xbob.learn.libsvm/api.h> #include <bob.learn.libsvm/api.h>
#include <structmember.h> #include <structmember.h>
/*********************************************** /***********************************************
* Implementation of Support Vector File class * * Implementation of Support Vector File class *
***********************************************/ ***********************************************/
PyDoc_STRVAR(s_file_str, XBOB_EXT_MODULE_PREFIX ".File"); PyDoc_STRVAR(s_file_str, BOB_EXT_MODULE_PREFIX ".File");
PyDoc_STRVAR(s_file_doc, PyDoc_STRVAR(s_file_doc,
"File(path)\n\ "File(path)\n\
...@@ -159,7 +159,7 @@ PyObject* PyBobLearnLibsvmFile_Repr(PyBobLearnLibsvmFileObject* self) { ...@@ -159,7 +159,7 @@ PyObject* PyBobLearnLibsvmFile_Repr(PyBobLearnLibsvmFileObject* self) {
/** /**
* Expected output: * Expected output:
* *
* xbob.learn.libsvm.File('filename') * bob.learn.libsvm.File('filename')
*/ */
PyObject* retval = PyUnicode_FromFormat("%s('%s')", PyObject* retval = PyUnicode_FromFormat("%s('%s')",
...@@ -181,7 +181,7 @@ PyObject* PyBobLearnLibsvmFile_Str(PyBobLearnLibsvmFileObject* self) { ...@@ -181,7 +181,7 @@ PyObject* PyBobLearnLibsvmFile_Str(PyBobLearnLibsvmFileObject* self) {
/** /**
* Expected output: * Expected output:
* *
* xbob.learn.libsvm.File('filename') <float64@(3, 4)> * bob.learn.libsvm.File('filename') <float64@(3, 4)>
*/ */
PyObject* retval = PyUnicode_FromFormat("%s('%s') <float64@(%" PY_FORMAT_SIZE_T "d, %" PY_FORMAT_SIZE_T "d)>", PyObject* retval = PyUnicode_FromFormat("%s('%s') <float64@(%" PY_FORMAT_SIZE_T "d, %" PY_FORMAT_SIZE_T "d)>",
......
...@@ -7,18 +7,18 @@ ...@@ -7,18 +7,18 @@
* Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland * Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland
*/ */
#define XBOB_LEARN_LIBSVM_MODULE #define BOB_LEARN_LIBSVM_MODULE
#include <xbob.blitz/cppapi.h> #include <bob.blitz/cppapi.h>
#include <xbob.blitz/cleanup.h> #include <bob.blitz/cleanup.h>
#include <xbob.io.base/api.h> #include <bob.io.base/api.h>
#include <xbob.learn.libsvm/api.h> #include <bob.learn.libsvm/api.h>
#include <structmember.h> #include <structmember.h>
/******************************************************* /*******************************************************
* Implementation of Support Vector Machine base class * * Implementation of Support Vector Machine base class *
*******************************************************/ *******************************************************/
PyDoc_STRVAR(s_svm_str, XBOB_EXT_MODULE_PREFIX ".Machine"); PyDoc_STRVAR(s_svm_str, BOB_EXT_MODULE_PREFIX ".Machine");
PyDoc_STRVAR(s_svm_doc, PyDoc_STRVAR(s_svm_doc,
"Machine(path)\n\ "Machine(path)\n\
...@@ -59,7 +59,7 @@ state recovery from previous sessions.\n\ ...@@ -59,7 +59,7 @@ state recovery from previous sessions.\n\
"); ");
/*********************************************** /***********************************************
* Implementation of xbob.learn.libsvm.Machine * * Implementation of bob.learn.libsvm.Machine *
***********************************************/ ***********************************************/
static int PyBobLearnLibsvmMachine_init_svmfile static int PyBobLearnLibsvmMachine_init_svmfile
...@@ -416,7 +416,7 @@ PyObject* PyBobLearnLibsvmMachine_Repr(PyBobLearnLibsvmMachineObject* self) { ...@@ -416,7 +416,7 @@ PyObject* PyBobLearnLibsvmMachine_Repr(PyBobLearnLibsvmMachineObject* self) {
/** /**
* Expected output: * Expected output:
* *
* <xbob.learn.libsvm.Machine float64@(3, 2)> * <bob.learn.libsvm.Machine float64@(3, 2)>
*/ */
auto shape = make_safe(PyObject_GetAttrString((PyObject*)self, "shape")); auto shape = make_safe(PyObject_GetAttrString((PyObject*)self, "shape"));
...@@ -441,7 +441,7 @@ PyObject* PyBobLearnLibsvmMachine_Str(PyBobLearnLibsvmMachineObject* self) { ...@@ -441,7 +441,7 @@ PyObject* PyBobLearnLibsvmMachine_Str(PyBobLearnLibsvmMachineObject* self) {
/** /**
* Expected output: * Expected output:
* *
* xbob.learn.libsvm.Machine (float64) 3 inputs, 2 outputs * bob.learn.libsvm.Machine (float64) 3 inputs, 2 outputs
* properties... * properties...
* *
* TODO: Not fully implemented yet * TODO: Not fully implemented yet
...@@ -932,8 +932,8 @@ PyDoc_STRVAR(s_save_doc, ...@@ -932,8 +932,8 @@ PyDoc_STRVAR(s_save_doc,
o.save(hdf5file) -> None\n\ o.save(hdf5file) -> None\n\
\n\ \n\
Saves itself at a LIBSVM model file or into a\n\ Saves itself at a LIBSVM model file or into a\n\
:py:class:`xbob.io.HDF5File`. Saving the SVM into an\n\ :py:class:`bob.io.HDF5File`. Saving the SVM into an\n\
:py:class:`xbob.io.HDF5File` object, has the advantage of saving\n\ :py:class:`bob.io.HDF5File` object, has the advantage of saving\n\
input normalization options together with the machine, which are\n\ input normalization options together with the machine, which are\n\
automatically reloaded when you re-initialize it from the same\n\ automatically reloaded when you re-initialize it from the same\n\
:py:class:`HDF5File`.\n\ :py:class:`HDF5File`.\n\
......
...@@ -7,18 +7,18 @@ ...@@ -7,18 +7,18 @@
* Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland * Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland
*/ */
#define XBOB_LEARN_LIBSVM_MODULE #define BOB_LEARN_LIBSVM_MODULE
#include <xbob.blitz/cppapi.h> #include <bob.blitz/cppapi.h>
#include <xbob.blitz/cleanup.h> #include <bob.blitz/cleanup.h>
#include <xbob.io.base/api.h> #include <bob.io.base/api.h>
#include <xbob.learn.libsvm/api.h> #include <bob.learn.libsvm/api.h>
#include <structmember.h> #include <structmember.h>
/******************************************************* /*******************************************************
* Implementation of Support Vector Trainer base class * * Implementation of Support Vector Trainer base class *
*******************************************************/ *******************************************************/
PyDoc_STRVAR(s_svm_str, XBOB_EXT_MODULE_PREFIX ".Trainer"); PyDoc_STRVAR(s_svm_str, BOB_EXT_MODULE_PREFIX ".Trainer");
PyDoc_STRVAR(s_svm_doc, PyDoc_STRVAR(s_svm_doc,
"Trainer([machine_type='C_SVC', [kernel_type='RBF', [cache_size=100, [stop_epsilon=1e-3, [shrinking=True, [probability=False]]]]]]) -> new Trainer\n\ "Trainer([machine_type='C_SVC', [kernel_type='RBF', [cache_size=100, [stop_epsilon=1e-3, [shrinking=True, [probability=False]]]]]]) -> new Trainer\n\
...@@ -81,7 +81,7 @@ probability, bool\n\ ...@@ -81,7 +81,7 @@ probability, bool\n\
"); ");
/*********************************************** /***********************************************
* Implementation of xbob.learn.libsvm.Trainer * * Implementation of bob.learn.libsvm.Trainer *
***********************************************/ ***********************************************/
static int PyBobLearnLibsvmTrainer_init static int PyBobLearnLibsvmTrainer_init
...@@ -508,7 +508,7 @@ PyObject* PyBobLearnLibsvmTrainer_Repr(PyBobLearnLibsvmTrainerObject* self) { ...@@ -508,7 +508,7 @@ PyObject* PyBobLearnLibsvmTrainer_Repr(PyBobLearnLibsvmTrainerObject* self) {
/** /**
* Expected output: * Expected output:
* *
* <xbob.learn.libsvm.Trainer> * <bob.learn.libsvm.Trainer>
* *
* @TODO: Improve this output * @TODO: Improve this output
*/ */
...@@ -531,7 +531,7 @@ PyObject* PyBobLearnLibsvmTrainer_Str(PyBobLearnLibsvmTrainerObject* self) { ...@@ -531,7 +531,7 @@ PyObject* PyBobLearnLibsvmTrainer_Str(PyBobLearnLibsvmTrainerObject* self) {
/** /**
* Expected output: * Expected output:
* *
* xbob.learn.libsvm.Trainer * bob.learn.libsvm.Trainer
* *
* TODO: Not fully implemented yet * TODO: Not fully implemented yet
*/ */
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
* Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland * Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland
*/ */
#define XBOB_LEARN_LIBSVM_MODULE #define BOB_LEARN_LIBSVM_MODULE
#include <xbob.blitz/cleanup.h> #include <bob.blitz/cleanup.h>
#include <xbob.learn.libsvm/api.h> #include <bob.learn.libsvm/api.h>
PyObject* PyBobLearnLibsvm_MachineTypeAsString(bob::learn::libsvm::machine_t s) { PyObject* PyBobLearnLibsvm_MachineTypeAsString(bob::learn::libsvm::machine_t s) {
switch(s) { switch(s) {
......
...@@ -13,7 +13,7 @@ import numpy ...@@ -13,7 +13,7 @@ import numpy
import tempfile import tempfile
import pkg_resources import pkg_resources
import nose.tools import nose.tools
import xbob.io.base import bob.io.base
from . import File, Machine from . import File, Machine
...@@ -102,11 +102,11 @@ def test_can_save_hdf5(): ...@@ -102,11 +102,11 @@ def test_can_save_hdf5():
machine = Machine(HEART_MACHINE) machine = Machine(HEART_MACHINE)
tmp = tempname('.hdf5') tmp = tempname('.hdf5')
machine.save(xbob.io.base.HDF5File(tmp, 'w')) machine.save(bob.io.base.HDF5File(tmp, 'w'))
del machine del machine
# make sure that the save machine is the same as before # make sure that the save machine is the same as before
machine = Machine(xbob.io.base.HDF5File(tmp)) machine = Machine(bob.io.base.HDF5File(tmp))
nose.tools.eq_(machine.shape, (13,1)) nose.tools.eq_(machine.shape, (13,1))
nose.tools.eq_(machine.kernel_type, 'RBF') nose.tools.eq_(machine.kernel_type, 'RBF')
nose.tools.eq_(machine.machine_type, 'C_SVC') nose.tools.eq_(machine.machine_type, 'C_SVC')
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland * Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland
*/ */
#include <xbob.learn.libsvm/trainer.h> #include <bob.learn.libsvm/trainer.h>
#include <boost/format.hpp> #include <boost/format.hpp>
#include <boost/make_shared.hpp> #include <boost/make_shared.hpp>
#include <bob/core/logging.h> #include <bob/core/logging.h>
......
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
#ifdef NO_IMPORT_ARRAY #ifdef NO_IMPORT_ARRAY
#undef NO_IMPORT_ARRAY #undef NO_IMPORT_ARRAY
#endif #endif
#include <xbob.blitz/capi.h> #include <bob.blitz/capi.h>