A Python library implementing Factorization Machines with a scikit-learn compatible API for regression, classification, and ranking tasks.
fastFM is a Python library that implements Factorization Machines, a model class designed for supervised learning with high-dimensional sparse data. It solves problems like recommendation, click-through rate prediction, and ranking by efficiently modeling feature interactions. The library provides multiple optimization algorithms and integrates seamlessly with the scikit-learn ecosystem.
Data scientists and machine learning engineers working on recommendation systems, advertising, or any task involving sparse feature interactions who want a performant, scikit-learn compatible implementation of Factorization Machines.
Developers choose fastFM for its combination of scikit-learn API familiarity, multiple solver options including Bayesian inference, and high performance through Cython-wrapped C code, making it a practical choice for production use.
fastFM: A Library for Factorization Machines
Uses the familiar fit/predict interface, making it easy to incorporate into existing machine learning pipelines, as demonstrated in the usage example with FMRegression.
Supports stochastic gradient descent, coordinate descent, and Markov Chain Monte Carlo, providing flexibility for different optimization needs and Bayesian inference, as outlined in the solver table.
Core algorithms are implemented in C and wrapped with Cython, ensuring fast execution on high-dimensional sparse data, which is critical for recommendation systems and CTR estimation.
The MCMC solver offers probabilistic predictions with uncertainty, a rare feature in FM implementations that is valuable for risk-aware applications like advertising.
Actively supports only Linux and OS X, with no guarantees for Windows, as explicitly stated in the README under 'Supported Operating Systems.'
Source installation requires manual setup of CBLAS and Python development headers, which can be error-prone and challenging for users without system administration experience.
Primary resources are academic papers on arXiv, and practical tutorials are limited, which may hinder quick adoption and advanced usage beyond basic examples.
As an academic project from 2016, it may not receive frequent updates or new features compared to commercially-backed alternatives, though it remains stable for core functionality.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.