Highly optimized and parallelized methods for Bayesian Factorization, including BPMF and Macau. The package uses optimized OpenMP/C++ code with a Cython wrapper to factorize large scale matrices. Macau method is able to perform matrix and tensor factorization while incorporating high-dimensional side information to the factorization.
For examples see documentation.
To install Macau it possible to use pre-compiled binaries or compile it from source.
# install dependencies:
sudo apt-get install libopenblas-dev autoconf gfortran
pip install numpy scipy cython pandas
pip install requests
# checkout and install Macau
git clone https://github.com/jaak-s/macau.git
cd macau
python setup.py install --user
If you have openblas installed (package libopenblas-dev in Ubuntu) available and gcc
and g++
installed,
then following steps install macau:
git clone https://github.com/jaak-s/macau.git
cd macau
pip install .
Instead of pip install .
one can use
python setup.py install --user
# install dependencies
pip install numpy
pip install scipy
pip install pandas
pip install cython
pip install requests
# install brew (http://brew.sh/)
brew install homebrew/core/openblas
brew install gcc
# checkout and install Macau
git clone https://github.com/jaak-s/macau.git
cd macau
CC=g++-5 CXX=g++-5 python setup.py install
Macau is also available using Docker image at stadius/macau
.
Without mounting a local directory the docker can be executed by
docker run -it --rm -p 8888:8888 stadius/macau
To mount a local directory add -v ~/my_data_dir:/data
where
~/my_data_dir
is on the local system and /data
will be the folder
in the container:
docker run -v ~/my_data_dir:/data -it --rm -p 8888:8888 stadius/macau
There is a plan to support Python wheel packages. Currently, we do not have one built yet.