Skip to content

Latest commit

 

History

History

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Cornac examples directory

Basic usage

first_example.py - Your very first example with Cornac.

pmf_ratio.py - Splitting data into train/val/test sets based on provided sizes (RatioSplit).

given_data.py - Evaluate the models with your own data splits.

dataframe_input.py - Use a pandas DataFrame as input to an evaluation method and a Dataset.

propensity_stratified_evaluation_example.py - Evaluate the models with Propensity Stratified Evaluation method.

export_results.py - Export the results of an experiment, with the model parameters and the evaluation seed, to a pandas DataFrame and a JSON file.

vbpr_tradesy.py - Image features associate with items/users.

c2pf_example.py - Items/users networks as graph modules.

conv_mf_example.py - Text data associate with items/users.

param_search.py - Hyper-parameter tuning with GridSearch and RandomSearch.

param_search_optuna.py - Hyper-parameter tuning with OptunaSearch, pruning unpromising SASRec trials on Amazon Beauty.

ann_example.py - Example for comparing different ANN searchers (Annoy, Faiss, HNSWLib, ScaNN) with BPR model on Netflix dataset.

ann_all.ipynb - Notebook comparing the indexing time, retrieval time and recall of different ANN searchers (Annoy, Faiss, HNSWLib, ScaNN) with MF model on Netflix dataset, and saving and loading them.


Multimodal Algorithms (Using Auxiliary Data)

Graph

c2pf_example.py - Collaborative Context Poisson Factorization (C2PF) with Amazon Office dataset.

cvaecf_filmtrust.py - Fit and evaluate Conditional VAE (CVAECF) on the FilmTrust dataset.

gcmc_example.py - Graph Convolutional Matrix Completion (GCMC) example with MovieLens 100K dataset.

lightgcn_example.py - LightGCN example with CiteULike dataset.

mcf_office.py - Fit Matrix Co-Factorization (MCF) to the Amazon Office dataset.

ngcf_example.py - NGCF example with CiteULike dataset.

pcrl_example.py - Probabilistic Collaborative Representation Learning (PCRL) Amazon Office dataset.

sbpr_epinions.py - Social Bayesian Personalized Ranking (SBPR) with Epinions dataset.

sorec_filmtrust.py - Social Recommendation using PMF (Sorec) with FilmTrust dataset.

Text

cdl_example.py - Collaborative Deep Learning (CDL) with CiteULike dataset.

cdr_example.py - Collaborative Deep Ranking (CDR) with CiteULike dataset.

companion_example.py - Comparative Aspects and Opinions Ranking for Recommendation Explanations (Companion) with Amazon Toy and Games dataset.

conv_mf_example.py - Convolutional Matrix Factorization (ConvMF) with MovieLens dataset.

ctr_example_citeulike.py - Collaborative Topic Regression (CTR) with CiteULike dataset.

cvae_example.py - Collaborative Variational Autoencoder (CVAE) with CiteULike dataset.

dmrl_example.py - Disentangled Multimodal Representation Learning (DMRL) with citeulike dataset.

trirank_example.py - TriRank with Amazon Toy and Games dataset.

efm_example.py - Explicit Factor Model (EFM) with Amazon Toy and Games dataset.

hft_example.py - Hidden Factor Topic (HFT) with MovieLens 1M dataset.

hrdr_example.py - Hybrid neural recommendation with joint deep representation learning of ratings and reviews (HRDR) with Amazon Digital Music dataset.

lrppm_example.py - Learn to Rank user Preferences based on Phrase-level sentiment analysis across Multiple categories (LRPPM) with Amazon Toy and Games dataset.

mter_example.py - Multi-Task Explainable Recommendation (MTER) with Amazon Toy and Games dataset.

narre_example.py - Neural Attention Rating Regression with Review-level Explanations (NARRE) with Amazon Digital Music dataset.

Image

amr_clothing.py - Adversarial Training Towards Robust Multimedia Recommender System (AMR) with Amazon Clothing dataset.

causalrec_clothing.py - CausalRec with Clothing dataset.

dmrl_clothes_example.py - Disentangled Multimodal Representation Learning (DMRL) with Amazon clothing dataset.

vbpr_tradesy.py - Visual Bayesian Personalized Ranking (VBPR) with Tradesy dataset.

vmf_clothing.py - Visual Matrix Factorization (VMF) with Amazon Clothing dataset.


Unimodal Algorithms

biased_mf.py - Matrix Factorization (MF) with biases.

bpr_netflix.py - Example to run Bayesian Personalized Ranking (BPR) with Netflix dataset.

ease_movielens.py - Embarrassingly Shallow Autoencoders (EASEᴿ) with MovieLens 1M dataset.

fm_example.py - Example to run Factorization Machines (FM) with MovieLens 100K dataset.

hpf_movielens.py - (Hierarchical) Poisson Factorization vs BPR on MovieLens data.

ibpr_example.py - Example to run Indexable Bayesian Personalized Ranking.

knn_movielens.py - Example to run Neighborhood-based models with MovieLens 100K dataset.

mmmf_exp.py - Maximum Margin Matrix Factorization (MMMF) with MovieLens 100K dataset.

ncf_example.py - Neural Collaborative Filtering (GMF, MLP, NeuMF) with Amazon Clothing dataset.

nmf_example.py - Non-negative Matrix Factorization (NMF) with RatioSplit.

pmf_ratio.py - Probabilistic Matrix Factorization (PMF) with RatioSplit.

recvae_example.py - New Variational Autoencoder for Top-N Recommendations with Implicit Feedback (RecVAE).

sansa_movielens.py - Scalable Approximate NonSymmetric Autoencoder (SANSA) with MovieLens 1M dataset.

sansa_tradesy.py - Scalable Approximate NonSymmetric Autoencoder (SANSA) with Tradesy dataset.

skm_movielens.py - SKMeans vs BPR on MovieLens data.

svd_example.py - Singular Value Decomposition (SVD) with MovieLens dataset.

vaecf_citeulike.py - Variational Autoencoder for Collaborative Filtering (VAECF) with CiteULike dataset.

vebpr_example.py - Example to run ViewEnhanced BPR with MovieLens 100K dataset

wmf_example.py - Weighted Matrix Factorization with CiteULike dataset.


Next-Item Algorithms

spop_yoochoose.py - Next-item recommendation based on item popularity.

gru4rec_yoochoose.py - Example of Session-based Recommendations with Recurrent Neural Networks (GRU4Rec).

fpmc_diginetica.py - Example of Factorizing Personalized Markov Chains (FPMC) with Diginetica dataset.

transformer_rec_diginetica.py - Example of Transformer-based Recommendation models (SASRec, TransformerRec with CLM/MLM objectives) with Diginetica dataset.

tiger_example.py - Generative retrieval with semantic IDs (TIGER) on Amazon Beauty with Sentence-T5 item content embeddings, reproducing the paper's leave-last-out protocol.

letter_example.py - Learnable item tokenization (LETTER): constrained/Sinkhorn RQ-VAE with collaborative + diversity regularization and a Semantic-ID T5 generator, with Diginetica dataset.

rpg_example.py - Parallel generation of long unordered semantic IDs (RPG): OPQ tokenizer + multi-token prediction + graph-guided decoding, with Diginetica dataset.

diger_example.py - Train DIGER with T5 generation and frequency-gated residual quantization on Amazon Beauty through FeatureModality, using validation-selected ST5/OpenAI presets.

diffgrm_example.py - Masked-diffusion generation of PSE semantic IDs (DiffGRM) on Amazon Sports with Sentence-T5 item content embeddings, OCN training, and CPD decoding.


Next-Basket Algorithms

gp_top_tafeng.py - Next-basket recommendation model that merely uses item top frequency.

dnntsp_tafeng.py - Predicting Temporal Sets with Deep Neural Networks (DNNTSP).

beacon_tafeng.py - Correlation-Sensitive Next-Basket Recommendation (Beacon).

tifuknn_tafeng.py - Example of Temporal-Item-Frequency-based User-KNN (TIFUKNN).

upcf_tafeng.py - Example of Recency Aware Collaborative Filtering for Next Basket Recommendation (UPCF).


Bundle Algorithms

bundle_dcbr_ifashion.py - Example of DCBR bundle recommendation on iFashion.

bundle_pop_youshu.py - Example of bundle popularity baselines (BundlePop) for bundle recommendation, completion and construction.

crosscbr_example.py - Example of CrossCBR bundle recommendation on Youshu with independent user-item feedback.

multicbr_example.py - Example of MultiCBR three-view bundle recommendation on Youshu.

bundlegt_example.py - Example of BundleGT strategy-aware bundle recommendation on Youshu.