项目概述
Fast Python Collaborative Filtering for Implicit Feedback Datasets
项目地址
https://github.com/benfred/implicit
项目页面预览
关键指标
- Stars:3761
- 主要语言:Python
- License:MIT License
- 最近更新:2024-07-11T17:58:17Z
- 默认分支:main
本站高速下载(国内可用)
点击下载(本站镜像)
– SHA256:6edc89539e6ba176874eb935629b96ebeb1eb28d9b41f13e5c7cff3448d8a0fd
安装部署要点(README 精选)
Installation
Implicit can be installed from pypi with:
pip install implicit
Installing with pip will use prebuilt binary wheels on x86_64 Linux, Windows
and OSX. These wheels include GPU support on Linux.
Implicit can also be installed with conda:
# CPU only package
conda install -c conda-forge implicit
# CPU+GPU package
conda install -c conda-forge implicit implicit-proc=*=gpu
Basic Usage
import implicit
# initialize a model
model = implicit.als.AlternatingLeastSquares(factors=50)
# train the model on a sparse matrix of user/item/confidence weights
model.fit(user_item_data)
# recommend items for a user
recommendations = model.recommend(userid, user_item_data[userid])
# find related items
related = model.similar_items(itemid)
The examples folder has a program showing how to use this to compute similar artists on the
last.fm dataset.
For more information see the documentation.
Optimal Configuration
I’d recommend configuring SciPy to use Intel’s MKL matrix libraries. One easy way of doing this is by installing the Anaconda Python distribution.
For systems using OpenBLAS, I highly recommend setting ‘export OPENBLAS_NUM_THREADS=1’. This
disables its internal multithreading ability, which leads to substantial speedups for this
package. Likewise for Intel MKL, setting ‘export MKL_NUM_THREADS=1’ should also be set.
Released under the MIT License
常用命令(从 README 提取)
pip install implicit
# CPU only package
conda install -c conda-forge implicit
# CPU+GPU package
conda install -c conda-forge implicit implicit-proc=*=gpu
通用部署说明
- 下载源码并阅读 README
- 安装依赖(pip/npm/yarn 等)
- 配置环境变量(API Key、模型路径、数据库等)
- 启动服务并测试访问
- 上线建议:Nginx 反代 + HTTPS + 进程守护(systemd / pm2)
免责声明与版权说明
本文仅做开源项目整理与教程索引,源码版权归原作者所有,请遵循对应 License 合规使用。








暂无评论内容