Recommenders.jl

Author yng87
Popularity
6 Stars
Updated Last
11 Months Ago
Started In
January 2021

Recommenders.jl

Stable Dev Build Status

This package aims to provide light-weight recommendation models, mainly for implicit feedback data. We want to provide

  • consistent interface for model training and inference
  • flexibility for input data with Tables.jl package, which offers simple, but powerful abstract interface for tabular data
  • robust baseline metrics for classic datasets. The comparison of advanced recommendation models to these baselines turns out to be challenge.

See Getting started and examples.

Implemented algorithms

Model Ref. Note
Most popular
ItemkNN Item-based top-N recommendation algorithms
Matrix factorization Neural Collaborative Filtering vs. Matrix Factorization Revisited Implemented algorithm is only for implicit feedback.
BPR MF BPR: Bayesian Personalized Ranking from Implicit Feedback Simple SGD with negative samping is implemented instead of the original learnBPR algorithm.
SLIM ElasticNet Efficient Top-N Recommendation by Linear Regression
SLIM: Sparse Linear Methods for Top-N Recommender Systems
Random walk Pixie: A System for Recommending 3+ Billion Items to 200+ Million Users in Real-Time

Evaluation

Tuning and evaluation scripts are found in examples.

Movielens 100k

Random 80/20 split, treated as implicit feedback.

Model Precision@10 Recall@10 nDCG@10 Best parameters
Most popular 0.1897 0.1182 0.2197
ItemkNN 0.3284 0.2180 0.3986

weighting: BM25
weighting_at_inference: false
topk: 358
normalize: true
normalize_similarity: true
shrink: 0.00258278

Matrix factorization 0.3657 0.2416 0.4402

dimension: 32
l2_coeff: 0.01797358830471941
n_epochs: 128
n_negatives: 7
learning_rate: 0.017678089718746345

BPR MF 0.3463 0.2316 0.4083

dimension: 512
l2_coeff: 0.015587614364453028
n_epochs: 128
n_negatives: 12
learning_rate: 0.007785000886303088

SLIM ElasticNet 0.3626 0.2385 0.4359

k: 908
λminratio: 0.029052468222707274
l1_ratio: 0.003308685140740372

Random walk 0.2634 0.1828 0.3255

pixie_walk_length_scaling: false
pixie_multi_hit_boosting: false
terminate_prob: 0.9
total_walk_length: 51307
min_high_visited_candidates: 500
high_visited_count_threshold: 64

Movielens 1M

Random 80/20 split, treated as implicit feedback.

Model Precision@10 Recall@10 nDCG@10 Best parameters
Most popular 0.1816 0.06661 0.2022
ItemkNN 0.3311 0.1489 0.3734

weighting: TF-IDF
topk: 43
normalize: true
normalize_similarity: true
shrink: 0.453735

Matrix factorization 0.3752 0.1687 0.4203

dimension: 128
l2_coeff: 0.005720177108336541
n_epochs: 256
n_negatives: 18
learning_rate: 0.0012750705664730715

BPR MF 0.3358 0.1432 0.3715

dimension: 128
l2_coeff: 0.017941536727080445
n_epochs: 256
n_negatives: 6
learning_rate: 0.0014264826446678315

SLIM ElasticNet 0.3831 0.1792 0.4334

k: 444
λminratio: 3.968133599128073e-5
l1_ratio: 2.500068207067635e-5

Random walk 0.2314 0.09729 0.2665

pixie_walk_length_scaling: false
pixie_multi_hit_boosting: false
terminate_prob: 0.9
total_walk_length: 712047
min_high_visited_candidates: None
high_visited_count_threshold: Inf