Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation updates #152

Merged
merged 4 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SMURFF - Scalable Matrix Factorization Framework
================================================

|Azure Build Status| |Anaconda-Server Badge|
|GitHub Build Status| |Anaconda-Server Badge|

What is Bayesian Matrix Factorization
-------------------------------------
Expand Down Expand Up @@ -76,17 +76,17 @@ Citing SMURFF
-------------

If you are using SMURFF in a scientific publication, please cite the following preprint plus the paper describing the corresponding algorithm:

SMURFF: a High-Performance Framework for Matrix Factorization arXiv preprint `arXiv:1904:02514 <https://arxiv.org/abs/1904.02514>`_

When using pure Bayesian Probabilistic Matrix Factorization, please also cite:

Salakhutdinov R, Mnih A. Bayesian probabilistic matrix factorization using Markov chain Monte Carlo. In Proceedings of the 25th international conference on Machine learning (ICML '08), 2008. ACM, New York, NY, USA, 880-887.
Salakhutdinov R, Mnih A. Bayesian probabilistic matrix factorization using Markov chain Monte Carlo. In Proceedings of the 25th international conference on Machine learning (ICML '08), 2008. ACM, New York, NY, USA, 880-887.

When using Bayesian Factorization with Side Information, please also cite:

Simm J, Arany Á, Zakeri P, Haber T, Wegner JK, Chupakhin V, Ceulemans H, Moreau Y. Macau: Scalable Bayesian Factorization with High-Dimensional Side Information Using MCMC Proc. of the Machine Learning for Signal Processing (MLSP), 2017 IEEE 27th International Workshop on MLSP; 2017; Vol. 2017-September; pp. 1 - 6. Tokyo, Japan.

When using Group Factor Analysis, please also cite:

Klami A, Virtanen S, Leppäaho E, Kaski S., "Group Factor Analysis," in IEEE Transactions on Neural Networks and Learning Systems, vol. 26, no. 9, pp. 2136-2147, Sept. 2015.
Expand All @@ -98,8 +98,8 @@ Acknowledgements
Over the course of the last 5 years, this work has been supported by the EU H2020 FET-HPC projects
EPEEC (contract #801051), ExCAPE (contract #671555) and EXA2CT (contract #610741), and the Flemish Exaptation project.

.. |Azure Build Status| image:: https://dev.azure.com/ExaScience/smurff/_apis/build/status/ExaScience.smurff?branchName=master
:target: https://dev.azure.com/ExaScience/smurff/_build
.. |GitHub Build Status| image:: https://github.com/ExaScience/smurff/actions/workflows/build_linux.yml/badge.svg
:target: https://github.com/ExaScience/smurff

.. |Anaconda-Server Badge| image:: https://anaconda.org/vanderaa/smurff/badges/version.svg
:target: https://conda.anaconda.org/vanderaa
74 changes: 30 additions & 44 deletions docs/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -1,81 +1,67 @@
Compilation of SMURFF
=====================

Note: the easiest way to install SMURFF is not to build it yourself. Install the binary
Note: the easiest way to install SMURFF is not to build it yourself. Install the binary
`Conda <https://conda.io>`__ package:

.. code:: bash

conda install -c vanderaa smurff


When compiling SMURFF yourself, you have 3 options:


Compilation using `conda build`
-------------------------------

Conda build works on Linux, macOS and Windows. Execute

.. code:: bash

conda build smurff
conda build -c conda-forge -c vanderaa smurff

in the `conda-recipes` directory.

Compilation using CMake
-----------------------
Compile the binary standalone binary `smurff` using CMake
---------------------------------------------------------

This will not create the `smurff` python package.

C++ Requirements
~~~~~~~~~~~~~~~~

- CMake 3.6 or later
- Eigen3 version 3.3.7 or later
- HighFive 2.2. from https://github.com/BlueBrain/HighFive/
- CMake 3.15 or later
- Eigen3 version 3.3.7 or later
- HighFive 2.9. from https://github.com/BlueBrain/HighFive/
- Boost 1.5x or newer

Python Requirements
~~~~~~~~~~~~~~~~~~~

As in setup.py:

install_requires = [ 'numpy', 'scipy', 'pandas', 'scikit-learn', 'h5sparse-tensor' ],
setup_requires = ['setuptools_scm', 'pybind11' ],
CMake Options
~~~~~~~~~~~~~

Compile using setup.py
~~~~~~~~~~~~~~~~~~~~~~
- Build type switches:
- `-DCMAKE\_BUILD\_TYPE` - Debug/Release

Running
setup.py install
- Algebra library: you can specify
- `-DENABLE\_BLAS` - ON/OFF: BLAS acceleration for Eigen is enable by default.
- `-DBLA_VENDOR` allows you to specify which BLAS implementation to use.

will run CMake to configure, compile and install SMURFF.
Extra arguments to CMake can be passed with
- Other: look in the top-level `CMakeFile.txt` for more options.

setup.py --extra-cmake-args <...> install

or by setting the `CMAKE_ARGS` environment variables.
Python package using pip
------------------------

CMake Options
~~~~~~~~~~~~~
The python package is built using scikit-build-core <https://github.com/scikit-build/scikit-build-core>,
which calls CMake to compile the C++ extension. Hence you can simply run:

- Build type switches:
- CMAKE\_BUILD\_TYPE - Debug/Release
.. code:: bash

- Algebra library switches (select only one):
- When no switches are specified, CMake will try to find
any LAPACK and BLAS library on your system.
- ENABLE\_OPENBLAS - ON/OFF (should include openblas
library when linking. openblas also contains
implementation of lapack called relapack)
- ENABLE\_MKL - ON/OFF: tries to find the `MKL single dynamic
library <https://software.intel.com/en-us/mkl-linux-developer-guide-using-the-single-dynamic-library>`_.
pip install .

- Python:
- ENABLE\_PYTHON

Linux and macOs Specific
~~~~~~~~~~~~~~~~~~~~~~~~
Linux and macOs Specific
------------------------

Have a look in `ci/ <../ci/>`__ for Docker build scripts and for Linux+macOS wheel scripts. These scripts should
give you a good idea on how to compiler on an Ubuntu and macOS system.

Windows Specific
~~~~~~~~~~~~~~~~

Work for a vcpkg-based build is in progress.
3 changes: 1 addition & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../python/matrix_io'))

# Exclude build directory and Jupyter backup files:
exclude_patterns = ['_build', '**.ipynb_checkpoints']
Expand Down Expand Up @@ -116,7 +115,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/different_noise_models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
"\n",
"## using activity threshold pIC50 > 6. to binarize train data\n",
"trainSession.addTrainAndTest(ic50_train, ic50_test, smurff.ProbitNoise(ic50_threshold))\n",
"trainSession.addSideInfo(0, ecfp, direct = True)\n",
"trainSession.addSideInfo(0, ecfp, direct = False)\n",
"predictions = trainSession.run()\n",
"print(\"RMSE = %.2f\" % smurff.calc_rmse(predictions))\n",
"print(\"AUC = %.2f\" % smurff.calc_auc(predictions, ic50_threshold))"
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ipython
sphinx>=1.4
sphinx_rtd_theme
ipykernel
nbsphinx
pygments>=2.6.1
Expand Down
Loading