{"name":"fastFM: A High-Performance Python Library for Factorization Machines","description":"fastFM is a powerful Python library designed for Factorization Machines, offering high-performance implementations of various optimization routines. It integrates seamlessly with the scikit-learn API, making it accessible for machine learning practitioners. The library supports regression, classification, and ranking problems, leveraging C and Cython for speed-critical operations.","github":"https://github.com/ibayer/fastFM","url":"https://osrepos.com/repo/ibayer-fastfm","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/ibayer-fastfm","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/ibayer-fastfm.md","json":"https://osrepos.com/repo/ibayer-fastfm.json","topics":["Python","Factorization Machines","Machine Learning","Recommender Systems","Matrix Factorization","Data Science","AI"],"keywords":["Python","Factorization Machines","Machine Learning","Recommender Systems","Matrix Factorization","Data Science","AI"],"stars":null,"summary":"fastFM is a powerful Python library designed for Factorization Machines, offering high-performance implementations of various optimization routines. It integrates seamlessly with the scikit-learn API, making it accessible for machine learning practitioners. The library supports regression, classification, and ranking problems, leveraging C and Cython for speed-critical operations.","content":"## Introduction\n\nfastFM is a high-performance Python library dedicated to Factorization Machines (FMs), a powerful class of models widely used in recommender systems and other machine learning tasks. It provides efficient implementations of various optimization routines, including Stochastic Gradient Descent (SGD), Coordinate Descent (CD), and Markov Chain Monte Carlo (MCMC) for Bayesian inference.\n\nDesigned with the familiar scikit-learn API, fastFM makes it easy for Python developers to integrate Factorization Machines into their workflows. The library's performance-critical code is written in C and wrapped with Cython, ensuring fast execution. fastFM supports a range of problems, including regression, classification, and ranking.\n\nIf you use fastFM in scientific articles, please cite the following publication:\n> Bayer, I. \"fastFM: A Library for Factorization Machines\" Journal of Machine Learning Research 17, pp. 1-5 (2016)\n\n## Installation\n\nfastFM offers both binary and source installation options. It is actively supported on Linux (Ubuntu 14.04 LTS) and OS X Mavericks.\n\n### Binary Install (64bit only)\n\nThe simplest way to get started is via pip:\n\nbash\npip install fastFM\n\n\n### Source Install\n\nFor source installation, ensure your Python and OS bit versions agree.\n\nbash\n# Install cblas and python-dev header (Linux only).\n# - cblas can be installed with libatlas-base-dev or libopenblas-dev (Ubuntu)\nsudo apt-get install python-dev libopenblas-dev\n\n# Clone the repo including submodules\ngit clone --recursive https://github.com/ibayer/fastFM.git\n\n# Enter the root directory\ncd fastFM\n\n# Install Python dependencies (Cython>=0.22, numpy, pandas, scipy, scikit-learn)\npip install -r ./requirements.txt\n\n# Compile the C extension.\nmake                      # build with default python version (python)\nPYTHON=python3 make       # build with custom python version (python3)\n\n# Install fastFM\npip install .\n\n\n## Examples\n\nUsing fastFM is straightforward, thanks to its scikit-learn compatible API. Here's a quick example for regression:\n\npython\nfrom fastFM import als\nfm = als.FMRegression(n_iter=1000, init_stdev=0.1, rank=2, l2_reg_w=0.1, l2_reg_V=0.5)\nfm.fit(X_train, y_train)\ny_pred = fm.predict(X_test)\n\n\nMore detailed usage instructions and tutorials can be found in the [online documentation](http://ibayer.github.io/fastFM) and on [arXiv](http://arxiv.org/abs/1505.00641).\n\n## Why Use fastFM?\n\nfastFM stands out as an excellent choice for implementing Factorization Machines due to several key advantages:\n\n*   **High Performance**: Leveraging C and Cython, fastFM delivers speed-critical operations efficiently, making it suitable for large datasets.\n*   **Scikit-learn API**: Its compatibility with the widely adopted scikit-learn API ensures ease of use and integration into existing machine learning pipelines.\n*   **Versatile Solvers**: The library offers a range of optimization routines, including SGD, CD, and MCMC, catering to different problem types and preferences.\n*   **Comprehensive Task Support**: Whether you're tackling regression, classification, or ranking problems, fastFM provides the necessary tools.\n*   **Bayesian Inference**: With MCMC support, fastFM allows for Bayesian inference, providing richer insights into model uncertainty.\n*   **Active Community**: The project encourages contributions and has clear guidelines for developers, fostering a growing community.\n\n## Links\n\n*   [GitHub Repository](https://github.com/ibayer/fastFM)\n*   [Online Documentation](http://ibayer.github.io/fastFM)\n*   [arXiv Paper](http://arxiv.org/abs/1505.00641)\n*   [fastFM-core (C code)](https://github.com/ibayer/fastFM-core)","metrics":{"detailViews":4,"githubClicks":7},"dates":{"published":null,"modified":"2026-05-13T12:52:26.000Z"}}