返回排行榜

benfred/implicit

Pythonbenfred.github.io/implicit/

Fast Python Collaborative Filtering for Implicit Feedback Datasets

collaborative-filteringmachine-learningmatrix-factorizationrecommender-systemrecommendation-systemrecommendation
Star 增长趋势
Star
3.8k
Forks
629
周增长
Issues
90
1k2k3k
2016年4月2019年9月2023年2月2026年7月
制品库PyPIpip install implicit
README

Implicit

Build
Status Documentation

Fast Python Collaborative Filtering for Implicit Datasets.

This project provides fast Python implementations of several different popular recommendation algorithms for implicit feedback datasets:

All models have multi-threaded training routines, using Cython and OpenMP to fit the models in parallel among all available CPU cores. In addition, the ALS and BPR models both have custom CUDA kernels - enabling fitting on compatible GPU's. Approximate nearest neighbours libraries such as Annoy, NMSLIB and Faiss can also be used by Implicit to speed up making recommendations.

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.

Articles about Implicit

These blog posts describe the algorithms that power this library:

There are also several other articles about using Implicit to build recommendation systems:

Requirements

This library requires SciPy version 0.16 or later and Python version 3.9 or later.

GPU Support requires version 13 of the NVidia CUDA Toolkit, and requires that RMM be installed pip install rmm-cu13

This library is tested with Python 3.9 to 3.14 on Ubuntu, OSX and Windows.

Benchmarks

Simple benchmarks comparing the ALS fitting time versus Spark can be found here.

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

相关仓库
gorse-io/gorse

AI powered open source recommender system engine supports classical/LLM rankers and multimodal content via embedding

GoGo ModulesApache License 2.0recommender-systemcollaborative-filtering
gorse.io
9.8k912
hongleizhang/RSPapers

RSTutorials: A Curated List of Must-read Papers on Recommender System.

MIT Licenseread-papersrecommender-system
6.5k1.3k
RUCAIBox/RecBole

A unified, comprehensive and efficient recommendation library

PythonPyPIMIT Licenserecommender-systemscollaborative-filtering
recbole.io
4.5k746
guoguibing/librec

LibRec: A Leading Java Library for Recommender Systems, see

JavaMavenOtherrecommender-systemsrecommendation-algorithms
librec.net
3.3k1k
robi56/Deep-Learning-for-Recommendation-Systems

This repository contains Deep Learning based articles , paper and repositories for Recommender Systems

recommender-systemdeep-learning
2.9k698
shenweichen/DeepMatch

A deep matching model library for recommendations & advertising. It's easy to train models and to export representation vectors which can be used for ANN search.

PythonPyPIApache License 2.0dssmyoutubednn
deepmatch.readthedocs.io/en/latest/
2.4k544
hexiangnan/neural_collaborative_filtering

Neural Collaborative Filtering

PythonPyPIApache License 2.0deep-learningrecommender-system
1.9k667
NVIDIA/DeepRecommender

Deep learning for recommender systems

PythonPyPIMIT Licensedeep-autoencoderscollaborative-filtering
1.7k340
cheungdaven/DeepRec

An Open-source Toolkit for Deep Learning based Recommendation with Tensorflow.

PythonPyPIGNU General Public License v3.0recommender-systemsdeep-learning
1.2k291
rixwew/pytorch-fm

Factorization Machine models in PyTorch

PythonPyPIMIT Licensefactorization-machinespytorch
1.1k231
wubinzzu/NeuRec

Next RecSys Library

PythonPyPIrecommender-systemsneural-networks
1.1k217
PreferredAI/cornac

A Comparative Framework for Multimodal Recommender Systems

PythonPyPIApache License 2.0recommender-systemrecommendation-algorithms
cornac.preferred.ai
1.1k171