{"id":13398269,"url":"https://github.com/lyst/lightfm","last_synced_at":"2026-07-06T12:02:28.901Z","repository":{"id":35664922,"uuid":"39940111","full_name":"lyst/lightfm","owner":"lyst","description":"A Python implementation of LightFM, a hybrid recommendation algorithm.","archived":false,"fork":false,"pushed_at":"2024-07-24T18:48:54.000Z","size":8085,"stargazers_count":5088,"open_issues_count":165,"forks_count":724,"subscribers_count":83,"default_branch":"master","last_synced_at":"2026-05-31T21:08:34.001Z","etag":null,"topics":["learning-to-rank","machine-learning","matrix-factorization","python","recommender","recommender-system"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lyst.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-30T08:34:00.000Z","updated_at":"2026-05-30T01:01:53.000Z","dependencies_parsed_at":"2022-07-12T13:01:19.528Z","dependency_job_id":"264a5243-2804-49e0-b545-0c5b2d8e94b0","html_url":"https://github.com/lyst/lightfm","commit_stats":{"total_commits":304,"total_committers":47,"mean_commits":6.468085106382978,"dds":0.7138157894736843,"last_synced_commit":"688feded0717f289933b95a0134bad6fbe547331"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/lyst/lightfm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyst%2Flightfm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyst%2Flightfm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyst%2Flightfm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyst%2Flightfm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lyst","download_url":"https://codeload.github.com/lyst/lightfm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyst%2Flightfm/sbom","scorecard":{"id":607571,"data":{"date":"2025-08-11","repo":{"name":"github.com/lyst/lightfm","commit":"0c9c31e027b976beab2385e268b58010fff46096"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.4,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":7,"reason":"Found 6/8 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/lyst/lightfm/test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/lyst/lightfm/test.yaml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating ubuntu:16.04 to ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d6","Warn: downloadThenRun not pinned by hash: Dockerfile:6-9","Warn: pipCommand not pinned by hash: Dockerfile:20","Warn: pipCommand not pinned by hash: .github/workflows/test.yaml:33","Warn: pipCommand not pinned by hash: .github/workflows/test.yaml:34","Warn: pipCommand not pinned by hash: .github/workflows/test.yaml:43","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T01:56:39.960Z","repository_id":35664922,"created_at":"2025-08-21T01:56:39.960Z","updated_at":"2025-08-21T01:56:39.960Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35189713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["learning-to-rank","machine-learning","matrix-factorization","python","recommender","recommender-system"],"created_at":"2024-07-30T19:00:21.485Z","updated_at":"2026-07-06T12:02:28.865Z","avatar_url":"https://github.com/lyst.png","language":"Python","funding_links":[],"categories":["Recommender Systems","资源列表","5. GitHub Repositories","Python","Learning-to-Rank \u0026 Recommender Systems","Recommendation Systems","Recommendation, Advertisement \u0026 Ranking","推荐系统","推荐系统算法库与列表","Industry Strength RecSys","Recommender Systems [🔝](#readme)","Awesome Python","Feature Extraction","Libraries","Recommendation"],"sub_categories":["推荐系统","Others","网络服务_其他","Recommender Systems","Ranking/Recommender","Tools"],"readme":"# LightFM\n\n![LightFM logo](lightfm.png)\n\n| Build status | |\n|---|---|\n| Linux |[![Circle CI](https://circleci.com/gh/lyst/lightfm.svg?style=svg)](https://circleci.com/gh/lyst/lightfm)|\n| OSX (OpenMP disabled)|[![Travis CI](https://travis-ci.org/lyst/lightfm.svg?branch=master)](https://travis-ci.org/lyst/lightfm)|\n| Windows (OpenMP disabled) |[![Appveyor](https://ci.appveyor.com/api/projects/status/6cqpqb6969i1h4p7/branch/master?svg=true)](https://ci.appveyor.com/project/maciejkula/lightfm/branch/master)|\n\n[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/lightfm-rec/Lobby) [![PyPI](https://img.shields.io/pypi/v/lightfm.svg)](https://pypi.python.org/pypi/lightfm/)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/lightfm/badges/version.svg)](https://anaconda.org/conda-forge/lightfm)\n\nLightFM is a Python implementation of a number of popular recommendation algorithms for both implicit and explicit feedback, including efficient implementation of BPR and WARP ranking losses. It's easy to use, fast (via multithreaded model estimation), and produces high quality results.\n\nIt also makes it possible to incorporate both item and user metadata into the traditional matrix factorization algorithms. It represents each user and item as the sum of the latent representations of their features, thus allowing recommendations to generalise to new items (via item features) and to new users (via user features).\n\nFor more details, see the [Documentation](http://lyst.github.io/lightfm/docs/home.html).\n\nNeed help? Contact me via [email](mailto:lightfm@zoho.com), [Twitter](https://twitter.com/Maciej_Kula), or [Gitter](https://gitter.im/lightfm-rec/Lobby).\n\n## Installation\nInstall from `pip`:\n```\npip install lightfm\n```\nor Conda:\n```\nconda install -c conda-forge lightfm\n```\n\n## Quickstart\nFitting an implicit feedback model on the MovieLens 100k dataset is very easy:\n```python\nfrom lightfm import LightFM\nfrom lightfm.datasets import fetch_movielens\nfrom lightfm.evaluation import precision_at_k\n\n# Load the MovieLens 100k dataset. Only five\n# star ratings are treated as positive.\ndata = fetch_movielens(min_rating=5.0)\n\n# Instantiate and train the model\nmodel = LightFM(loss='warp')\nmodel.fit(data['train'], epochs=30, num_threads=2)\n\n# Evaluate the trained model\ntest_precision = precision_at_k(model, data['test'], k=5).mean()\n```\n\n## Articles and tutorials on using LightFM\n1. [Learning to Rank Sketchfab Models with LightFM](http://blog.ethanrosenthal.com/2016/11/07/implicit-mf-part-2/)\n2. [Metadata Embeddings for User and Item Cold-start Recommendations](http://building-babylon.net/2016/01/26/metadata-embeddings-for-user-and-item-cold-start-recommendations/)\n3. [Recommendation Systems - Learn Python for Data Science](https://www.youtube.com/watch?v=9gBC9R-msAk)\n4. [Using LightFM to Recommend Projects to Consultants](https://medium.com/product-at-catalant-technologies/using-lightfm-to-recommend-projects-to-consultants-44084df7321c#.gu887ky51)\n\n## How to cite\nPlease cite LightFM if it helps your research. You can use the following BibTeX entry:\n```\n@inproceedings{DBLP:conf/recsys/Kula15,\n  author    = {Maciej Kula},\n  editor    = {Toine Bogers and\n               Marijn Koolen},\n  title     = {Metadata Embeddings for User and Item Cold-start Recommendations},\n  booktitle = {Proceedings of the 2nd Workshop on New Trends on Content-Based Recommender\n               Systems co-located with 9th {ACM} Conference on Recommender Systems\n               (RecSys 2015), Vienna, Austria, September 16-20, 2015.},\n  series    = {{CEUR} Workshop Proceedings},\n  volume    = {1448},\n  pages     = {14--21},\n  publisher = {CEUR-WS.org},\n  year      = {2015},\n  url       = {http://ceur-ws.org/Vol-1448/paper4.pdf},\n}\n```\n\n## Development\nPull requests are welcome. To install for development:\n\n1. Clone the repository: `git clone git@github.com:lyst/lightfm.git`\n2. Setup a virtual environment: `cd lightfm \u0026\u0026 python3 -m venv venv \u0026\u0026 source ./venv/bin/activate`\n3. Install it for development using pip: `pip install -e . \u0026\u0026 pip install -r test-requirements.txt`\n4. You can run tests by running `./venv/bin/py.test tests`.\n5. LightFM uses [black](https://github.com/ambv/black) to enforce code formatting and flake8 for linting, see `lint-requirements.txt`.\n6. [Optional]: You can install pre-commit to locally enfore formatting and linting. Install with:\n    ```bash\n    pip install pre-commit\n    pre-commit install\n    ```\n\nWhen making changes to the `.pyx` extension files, you'll need to run `python setup.py cythonize` in order to produce the extension `.c` files before running `pip install -e .`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyst%2Flightfm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flyst%2Flightfm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyst%2Flightfm/lists"}