Mutual Fund Recommender System. Tailor for fund transactions.

Overview

Explainable Mutual Fund Recommendation

Data

Please see 'DATA_DESCRIPTION.md' for mode detail.

Recommender System Methods

Baseline

  • Collabarative Fiiltering
  • PersonFreq
  • PersonVolume

Stable

  • LightFM Meta
  • LightFM PureCF
  • LightFM Hybrid

Advanced

  • DGL
  • GCN

Part I: Fund Recommedation

Training

Supported models
  1. Heuristic
  2. LightFM (CF/Hybrid/Meta)
  3. SMORe
# Process 3 models in parallel
bash run_all.sh 
   

   
Arugments

You can also tune the detail parameter settings of each method in training pipeline.

--use_heuristic ">
# Commonly used arguments 
--model 
    
     
--model_type 
     
      
--model_hidden_dimension 
      
       
--evaluation_metrics 
       
        
--use_heuristic 
         
        
       
      
     
    

For example, LightFM with pure-CF method

EPOCHS=10
EMBED_SIZE=64
DATE=20181231

python3 train.py \
   --path_transaction data/${DATE}/transaction_train.csv \
   --path_transaction_eval data/${DATE}/transaction_eval.csv \
   --path_user data/${DATE}/customer.csv \
   --path_item data/${DATE}/product.csv \
   --model 'LightFM' \
   --model_path 'models/lightfm' \
   --model_type 'cf' \
   --model_hidden_dimension ${EMBED_SIZE} \
   --model_max_neg_sample 100 \
   --model_loss 'warp' \
   --training_do_evaluation \
   --training_verbose \
   --training_num_epochs ${EPOCHS} \
   --training_eval_per_epochs 1 \
   --evaluation_diff \
   --evaluation_regular \
   --evaluation_metrics '[email protected]' \
   --evaluation_metrics '[email protected]' \
   --evaluation_metrics '[email protected]' \
   --evaluation_metrics '[email protected]' \
   --use_heuristic 'frequency' \
   --use_heuristic 'volume' \
   --evaluation_results_csv results/lightfm_cf_evaluation_${DATE}.csv \
   --evaluation_rec_detail_report results/lightfm_cf_rec_detail_${DATE}.tsv \
       > logs/lightfm_cf_exp_${DATE}.log

For another example, SMORe

python3 train.py \
   --path_transaction data/${DATE}/transaction_train.csv \
   --path_transaction_eval data/${DATE}/transaction_eval.csv \
   --path_user data/${DATE}/customer.csv \
   --path_item data/${DATE}/product.csv \
   --model 'SMORe' \
   --model_path 'models/smore' \
   --model_hidden_dimension ${EMBED_SIZE} \
   --model_max_neg_sample 100 \
   --model_loss 'warp' \
   --training_do_ \
   --training_verbose \
   --training_num_epochs ${EPOCHS} \
   --training_eval_per_epochs 1 \
   --evaluation_diff \
   --evaluation_regular \
   --evaluation_metrics '[email protected]' \
   --evaluation_metrics '[email protected]' \
   --evaluation_metrics '[email protected]' \
   --evaluation_metrics '[email protected]' \
   --evaluation_results_csv results/smore_evaluation_${DATE}.csv \
   --evaluation_rec_detail_report results/smore_rec_detail_${DATE}.tsv \
       > logs/smore_exp_${DATE}.log

Evaluataion

To use the evaluation pipeline, you need a prediction rec file with the format like the example below:

# prediction rec file 
   
    \t
    
     \t
     
      \t
      
       \t
       
        \t
        
          CFDAXWccjJPoVInuiF0mMg== AG25 EXPLOIT SOLO 0 2 CFDAXWccjJPoVInuiF0mMg== XXXX EXPLOIT SOLO 0 1 CFDAXWccjJPoVInuiF0mMg== JJ15 EXPLOIT REGULAR 0 2 CFDAXWccjJPoVInuiF0mMg== XXXX EXPLOIT REGULAR 0 1 CFDAwH4y/ssuYSedFy8UMw== CC89 EXPLOIT REGULAR 0 2 CFDAwH4y/ssuYSedFy8UMw== XXXX EXPLOIT REGULAR 0 1 CFDA9UDJnLAm4/0txbPMVQ== AP06 EXPLORE NA 0 2 CFDA9UDJnLAm4/0txbPMVQ== XXXX EXPLORE NA 0 1 
        
       
      
     
    
   

Later you could directly use the evaluate pipeline

bash rec_convert_eval.sh 
   

   

In the evaluation pipeline, you need to convert the ground truth interaction into '.rec' format. For xample.

# truth rec file 
   
    \t
    
     \t
     
      \t
      
       \t
       
         CFDAXWccjJPoVInuiF0mMg== AG25 EXPLOIT SOLO 1.0 CFDAXWccjJPoVInuiF0mMg== JJ15 EXPLOIT REGULAR 1.0 CFDAwH4y/ssuYSedFy8UMw== CC89 EXPLOIT REGULAR 1.0 CFDA9UDJnLAm4/0txbPMVQ== AP06 EXPLORE NA 1.0 
       
      
     
    
   

Convert from the evaluation transaction (includes the preprocess pipeline) by the following code, which will save the corresponding rec file in the defined argument '--path_trainsaction_truth'

DATE=20181231
python3 convert_to_rec.py \
    --path_transaction data/${DATE}/transaction_train.csv \
    --path_transaction_eval data/${DATE}/transaction_eval.csv \
    --path_user data/${DATE}/customer.csv \
    --path_item data/${DATE}/product.csv \
    --path_transaction_truth rec/${DATE}.eval.truth.rec

And evaluate by the code "rec_eval.py"

DATE=20181231
python3 rec_eval.py \
   -truth rec/${DATE}.eval.truth.rec \ 
   -pred rec/pred.rec \     
   -metric '[email protected]' \          
   -metric '[email protected]' \          
   -metric '[email protected]' \
   -metric '[email protected]'

The results would be like

TRUTH REC FILE EXISTED:  'rec/20181231.eval.truth.rec'

EvalDict({                
          SUBSET     USERS     EXAMPLES 
        * EXPLORE    2305      2826     
        * EXPLOIT    33355     62403    
        * REGULAR    31763     59054    
        * SOLO       2747      3349                     
})
==============================
 [email protected]     on EXPLORE    0.0001
 [email protected]     on EXPLORE    0.0004
 [email protected]   on EXPLORE    0.0004
 [email protected]   on EXPLORE    0.0004
 [email protected]     on EXPLOIT    0.0000
 [email protected]     on EXPLOIT    0.0001
 [email protected]   on EXPLOIT    0.0001
 [email protected]   on EXPLOIT    0.0001
 [email protected]     on REGULAR    0.0000
 [email protected]     on REGULAR    0.0001
 [email protected]   on REGULAR    0.0001
 [email protected]   on REGULAR    0.0001
 [email protected]     on SOLO       0.0001
 [email protected]     on SOLO       0.0004
 [email protected]   on SOLO       0.0004
 [email protected]   on SOLO       0.0004
==============================

Results

Methods [email protected] [email protected] [email protected] [email protected]
Collabarative Fiiltering - - -
PersonFreq - - -
PersonVolume - - -
LightFM Meta - - -
LightFM PureCF - - -
LightFM Hybrid 0.000 0.000 0.000 0.000
DGL - - -
GCN - - -

Fund Explanation

Owner
JHJu
Research assistant @ cnc Lab, ASCITI
JHJu
Hierarchical Fashion Graph Network for Personalized Outfit Recommendation, SIGIR 2020

hierarchical_fashion_graph_network This is our Tensorflow implementation for the paper: Xingchen Li, Xiang Wang, Xiangnan He, Long Chen, Jun Xiao, and

LI Xingchen 70 Dec 05, 2022
A tensorflow implementation of the RecoGCN model in a CIKM'19 paper, titled with "Relation-Aware Graph Convolutional Networks for Agent-Initiated Social E-Commerce Recommendation".

This repo contains a tensorflow implementation of RecoGCN and the experiment dataset Running the RecoGCN model python train.py Example training outp

xfl15 30 Nov 25, 2022
大规模推荐算法库,包含推荐系统经典及最新算法LR、Wide&Deep、DSSM、TDM、MIND、Word2Vec、DeepWalk、SSR、GRU4Rec、Youtube_dnn、NCF、GNN、FM、FFM、DeepFM、DCN、DIN、DIEN、DLRM、MMOE、PLE、ESMM、MAML、xDeepFM、DeepFEFM、NFM、AFM、RALM、Deep Crossing、PNN、BST、AutoInt、FGCNN、FLEN、ListWise等

(中文文档|简体中文|English) 什么是推荐系统? 推荐系统是在互联网信息爆炸式增长的时代背景下,帮助用户高效获得感兴趣信息的关键; 推荐系统也是帮助产品最大限度吸引用户、留存用户、增加用户粘性、提高用户转化率的银弹。 有无数优秀的产品依靠用户可感知的推荐系统建立了良好的口碑,也有无数的公司依

3.6k Dec 30, 2022
基于个性化推荐的音乐播放系统

MusicPlayer 基于个性化推荐的音乐播放系统 Hi, 这是我在大四的时候做的毕设,现如今将该项目开源。 本项目是基于Python的tkinter和pygame所著。 该项目总体来说,代码比较烂(因为当时水平很菜)。 运行的话安装几个基本库就能跑,只不过里面的数据还没有上传至Github。 先

Cedric Niu 6 Nov 19, 2022
Knowledge-aware Coupled Graph Neural Network for Social Recommendation

KCGN AAAI-2021 《Knowledge-aware Coupled Graph Neural Network for Social Recommendation》 Environments python 3.8 pytorch-1.6 DGL 0.5.3 (https://github.

xhc 22 Nov 18, 2022
Books Recommendation With Python

Books-Recommendation Business Problem During the last few decades, with the rise

Çağrı Karadeniz 7 Mar 12, 2022
RetaGNN: Relational Temporal Attentive Graph Neural Networks for Holistic Sequential Recommendation

RetaGNN: Relational Temporal Attentive Graph Neural Networks for Holistic Sequential Recommendation Pytorch based implemention of Relational Temporal

28 Dec 28, 2022
Movie Recommender System

Movie-Recommender-System Movie-Recommender-System is a web application using which a user can select his/her watched movie from list and system will r

1 Jul 14, 2022
It is a movie recommender web application which is developed using the Python.

Movie Recommendation 🍿 System Watch Tutorial for this project Source IMDB Movie 5000 Dataset Inspired from this original repository. Features Simple

Kushal Bhavsar 10 Dec 26, 2022
Spark-movie-lens - An on-line movie recommender using Spark, Python Flask, and the MovieLens dataset

A scalable on-line movie recommender using Spark and Flask This Apache Spark tutorial will guide you step-by-step into how to use the MovieLens datase

Jose A Dianes 794 Dec 23, 2022
Continuous-Time Sequential Recommendation with Temporal Graph Collaborative Transformer

Introduction This is the repository of our accepted CIKM 2021 paper "Continuous-Time Sequential Recommendation with Temporal Graph Collaborative Trans

SeqRec 29 Dec 09, 2022
RecSim NG: Toward Principled Uncertainty Modeling for Recommender Ecosystems

RecSim NG, a probabilistic platform for multi-agent recommender systems simulation. RecSimNG is a scalable, modular, differentiable simulator implemented in Edward2 and TensorFlow. It offers: a power

Google Research 110 Dec 16, 2022
Mutual Fund Recommender System. Tailor for fund transactions.

Explainable Mutual Fund Recommendation Data Please see 'DATA_DESCRIPTION.md' for mode detail. Recommender System Methods Baseline Collabarative Fiilte

JHJu 2 May 19, 2022
Graph Neural Network based Social Recommendation Model. SIGIR2019.

Basic Information: This code is released for the papers: Le Wu, Peijie Sun, Yanjie Fu, Richang Hong, Xiting Wang and Meng Wang. A Neural Influence Dif

PeijieSun 144 Dec 29, 2022
Approximate Nearest Neighbors in C++/Python optimized for memory usage and loading/saving to disk

Annoy Annoy (Approximate Nearest Neighbors Oh Yeah) is a C++ library with Python bindings to search for points in space that are close to a given quer

Spotify 10.6k Jan 01, 2023
Elliot is a comprehensive recommendation framework that analyzes the recommendation problem from the researcher's perspective.

Comprehensive and Rigorous Framework for Reproducible Recommender Systems Evaluation

Information Systems Lab @ Polytechnic University of Bari 215 Nov 29, 2022
Learning Fair Representations for Recommendation: A Graph-based Perspective, WWW2021

FairGo WWW2021 Learning Fair Representations for Recommendation: A Graph-based Perspective As a key application of artificial intelligence, recommende

lei 39 Oct 26, 2022
Global Context Enhanced Social Recommendation with Hierarchical Graph Neural Networks

SR-HGNN ICDM-2020 《Global Context Enhanced Social Recommendation with Hierarchical Graph Neural Networks》 Environments python 3.8 pytorch-1.6 DGL 0.5.

xhc 9 Nov 12, 2022
ToR[e]cSys is a PyTorch Framework to implement recommendation system algorithms

ToR[e]cSys is a PyTorch Framework to implement recommendation system algorithms, including but not limited to click-through-rate (CTR) prediction, learning-to-ranking (LTR), and Matrix/Tensor Embeddi

LI, Wai Yin 90 Oct 08, 2022
Handling Information Loss of Graph Neural Networks for Session-based Recommendation

LESSR A PyTorch implementation of LESSR (Lossless Edge-order preserving aggregation and Shortcut graph attention for Session-based Recommendation) fro

Tianwen CHEN 62 Dec 03, 2022