Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Machine Learning
  3. libfm

libfm

GPL-3.0C++

A software implementation of factorization machines for estimating interactions between categorical variables in large datasets.

GitHubGitHub
1.5k stars409 forks0 contributors

What is libfm?

libFM is a software library implementing factorization machines, a machine learning approach for estimating interactions between categorical variables in large domains. It combines the generality of feature engineering with the superiority of factorization models, making it particularly useful for recommendation systems and predictive modeling tasks where categorical interactions are important.

Target Audience

Data scientists, machine learning engineers, and researchers working on recommendation systems, predictive modeling, or any application requiring estimation of interactions between categorical variables with large domains.

Value Proposition

Developers choose libFM because it provides a complete, efficient implementation of factorization machines with multiple optimization methods (SGD, ALS, MCMC), allowing flexibility in model training while handling the computational challenges of large categorical domains that traditional methods struggle with.

Overview

Library for factorization machines

Use Cases

Best For

  • Building recommendation systems with categorical user-item interactions
  • Predictive modeling tasks with high-dimensional categorical features
  • Estimating interactions between variables in large-scale datasets
  • Research on factorization models and their applications
  • Implementing machine learning models that require feature engineering flexibility
  • Handling sparse categorical data with large domain sizes

Not Ideal For

  • Projects requiring real-time, low-latency inference, as factorization machines can be computationally intensive during prediction
  • Teams heavily reliant on deep learning frameworks like TensorFlow or PyTorch, due to lack of native integration
  • Developers needing out-of-the-box Python or R APIs without compilation steps, as libFM is C-based and requires manual setup
  • Applications with primarily numerical data and simple linear relationships, where simpler models like linear regression would be more efficient

Pros & Cons

Pros

Multiple Optimization Methods

Supports stochastic gradient descent (SGD), alternating least squares (ALS), and Bayesian inference with MCMC, providing flexibility for different data types and training scenarios as highlighted in the README.

Feature Engineering Flexibility

Allows mimicking various factorization models through custom feature engineering, enabling users to tailor interactions for specific tasks, which is core to its design philosophy.

Efficient Large Domain Handling

Designed to handle categorical variables with extensive domain sizes effectively, making it ideal for recommendation systems and sparse datasets, as stated in the key features.

Robust Implementation

Tested with GNU compiler and make, ensuring stable performance and reliability for production use, as mentioned in the compile section.

Cons

Complex Setup Process

Requires compilation from source with GNU tools, which can be a barrier for users unfamiliar with C/C++ build systems or those on non-Linux platforms.

Outdated Documentation Format

Primary manual is a PDF (version 1.4.2), which may lack interactivity, searchability, and regular updates compared to modern online documentation.

Limited Language Bindings

No official Python or R APIs, forcing users to rely on system calls or community wrappers, which complicates integration into high-level data science workflows.

Steep Feature Engineering Curve

Success depends heavily on manual feature engineering and parameter tuning, requiring deep domain knowledge that might deter newcomers to factorization models.

Frequently Asked Questions

Quick Stats

Stars1,488
Forks409
Contributors0
Open Issues18
Last commit6 years ago
CreatedSince 2014

Tags

#recommender-systems#feature-engineering#predictive-modeling#machine-learning#mcmc

Built With

G
GNU Make
C
C++

Included in

Machine Learning72.2k
Auto-fetched 16 hours ago

Related Projects

PyTorch - Tensors and Dynamic neural networks in Python with strong GPU accelerationPyTorch - Tensors and Dynamic neural networks in Python with strong GPU acceleration

Tensors and Dynamic neural networks in Python with strong GPU acceleration

Stars99,427
Forks27,590
Last commit16 hours ago
keraskeras

Deep Learning for humans

Stars64,037
Forks19,763
Last commit22 hours ago
streamlitstreamlit

Streamlit — A faster way to build and share data apps.

Stars44,347
Forks4,214
Last commit1 day ago
gradiogradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!

Stars42,427
Forks3,414
Last commit2 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub