Crab

A Recommender Framework in Python

Participate

Fork the source code, join the mailing lists, report bugs to the issue tracker or participate in the next coding sprint. Read More...

Funding

This project is maintained by Muriçoca Labs, and others.

Muricoca

1. Installing Crab

There are different ways to get Crab installed:

  • Install the version of Crab provided by your operating system distribution . This is the quickest option for those who have operating systems that distribute Crab.
  • Install an official release. This is the best approach for users who want a stable version number and aren’t concerned about running a slightly older version of Crab.
  • Install the latest development version. This is best for users who want the latest-and-greatest features and aren’t afraid of running brand-new code.

1.1. Installing an official release

1.1.1. Installing from source

Installing from source requires you to have installed numpy, scipy, setuptools, scikits.learn, python development headers and a working C++ compiler. Under debian-like systems you can get all this by executing with root privileges:

sudo apt-get install python-dev python-numpy python-numpy-dev python-setuptools python-numpy-dev python-scipy libatlas-dev g++

In Order to install the latest stable release from scikits.learn, you can install it by using pip or easy_install:

pip install -U scikits.learn

or:

easy_install -U scikits.learn

Note

In Order to build the documentation and run the example code contains in this documentation you will need matplotlib:

sudo apt-get install python-matplotlib

Note

On Ubuntu LTS (10.04) the package libatlas-dev is called libatlas-headers

1.1.1.1. Easy install

This is usually the fastest way to install the latest stable release. If you have pip or easy_install, you can install or update with the command:

pip install -U crab

or:

easy_install -U crab

for easy_install. Note that you might need root privileges to run these commands.

1.1.1.2. From source package

Download the package from https://github.com/muricoca/crab/downloads , unpack the sources and cd into archive.

This packages uses distutils, which is the default way of installing python modules. The install command is:

python setup.py install

1.1.2. Windows installer

You can download a windows installer from downloads in the project’s web page. Note that must also have installed the packages numpy and setuptools.

This package is also expected to work with python(x,y) as of 2.6.5.5.

1.1.3. Building on windows

To build Crab on windows you will need a C/C++ compiler in addition to numpy, scipy and setuptools. At least MinGW (a port of GCC to Windows OS) and the Microsoft Visual C++ 2008 should work out of the box. To force the use of a particular compiler, write a file named setup.cfg in the source directory with the content:

[build_ext]
compiler=my_compiler

[build]
compiler=my_compiler

where my_compiler should be one of mingw32 or msvc.

When the appropriate compiler has been set, and assuming Python is in your PATH (see Python FAQ for windows for more details), installation is done by executing the command:

python setup.py install

To build a precompiled package like the ones distributed at the downloads section, the command to execute is:

python setup.py bdist_wininst -b doc/logos/crab-logo.bmp

This will create an installable binary under directory dist/.

1.2. Third party distributions of Crab

Some third-party distributions are now providing versions of crab integrated with their package-management systems.

These can make installation and upgrading much easier for users since the integration includes the ability to automatically install dependencies (numpy, scipy) that crab requires.

1.3. Bleeding Edge

See section Retrieving the latest code on how to get the development version.

1.4. Testing

Testing requires having the nose library. After installation, the package can be tested by executing from outside the source directory:

python -c "import scikits.crab as scc; scc.test()"

This should give you a lot of output (and some warnings) but eventually should finish with the a text similar to:

Ran 101 tests in 10.920s
OK

otherwise please consider posting an issue into the bug tracker or to the Mailing List.

crab can also be tested without having the package installed. For this you must compile the sources inplace from the source directory:

python setup.py build_ext --inplace

Test can now be run using nosetest:

nosetests scikits/crab/

If you are running the deveopment version, this is automated in the commands make in and make test.

Warning

Because nosetest does not play well with multiprocessing on windows, this last approach is not recommended on such system.