# lyst/lightfm

A Python implementation of LightFM, a hybrid recommendation algorithm.

Repository: https://github.com/lyst/lightfm
Canonical: https://ross.abutalabs.com/products/lightfm
Language: Python
License: Apache-2.0
License Family: permissive
Topics: machine-learning, recommender, python, matrix-factorization, learning-to-rank, recommender-system
Last push: 2024-07-24T18:48:54+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4052, "days_push": 770, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5111, forks 725 (observed 2026-08-28T04:09:09.910177+00:00)

## What it is
LightFM is a Python library implementing hybrid recommendation algorithms that combine collaborative filtering with user and item metadata via matrix factorization. It supports implicit and explicit feedback with efficient BPR and WARP ranking losses and multithreaded training.

## Use cases
- build a movie recommendation engine in python
- recommend items to users with implicit feedback data
- handle cold-start recommendations using item and user metadata
- train a matrix factorization model with WARP ranking loss
- build a hybrid recommender combining content features and collaborative signals
- evaluate recommender models with precision at k

## When to choose
- you need hybrid recommendations that generalize to new users and items via metadata
- you want fast, multithreaded matrix factorization with ranking losses like BPR or WARP
- you work in Python with sparse interaction data and want a simple, well-proven API

## When to avoid
- you need deep learning or sequence-based recommenders rather than factorization models
- you need a scalable distributed recommender for very large industrial datasets
- you need actively developed features; the project is largely in maintenance mode

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, search-engine
- domain: machine-learning, data-science, analytics
- platform: python, windows
- tags: recommender-system, matrix-factorization, collaborative-filtering, hybrid-recommendations, learning-to-rank, implicit-feedback, bpr, warp, linux, macos

## Member repositories
- lyst/lightfm (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:09.910177+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:02:09.096967+00:00, confidence not recorded.
  - readme: https://github.com/lyst/lightfm (fetched 2026-08-28T04:09:09.910177+00:00, sha a3f6ccb9ffcd)
  - registry_pypi: https://pypi.org/pypi/lightfm/json (fetched 2026-08-29T08:56:54.814774+00:00, sha adc913364582)
- Data as of 2026-08-30T08:39:29.467469+00:00.
