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
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
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
Code for KHGT model, AAAI2021

KHGT Code for KHGT accepted by AAAI2021 Please unzip the data files in Datasets/ first. To run KHGT on Yelp data, use python labcode_yelp.py For Movi

32 Nov 29, 2022
QRec: A Python Framework for quick implementation of recommender systems (TensorFlow Based)

QRec is a Python framework for recommender systems (Supported by Python 3.7.4 and Tensorflow 1.14+) in which a number of influential and newly state-of-the-art recommendation models are implemented.

Yu 1.4k Dec 27, 2022
Respiratory Health Recommendation System

Respiratory-Health-Recommendation-System Respiratory Health Recommendation System based on Air Quality Index Forecasts This project aims to provide pr

Abhishek Gawabde 1 Jan 29, 2022
A TensorFlow recommendation algorithm and framework in Python.

TensorRec A TensorFlow recommendation algorithm and framework in Python. NOTE: TensorRec is not under active development TensorRec will not be receivi

James Kirk 1.2k Jan 04, 2023
Graph Neural Networks for Recommender Systems

This repository contains code to train and test GNN models for recommendation, mainly using the Deep Graph Library (DGL).

217 Jan 04, 2023
Cloud-based recommendation system

This project is based on cloud services to create data lake, ETL process, train and deploy learning model to implement a recommendation system.

Yi Ding 1 Feb 02, 2022
Code for ICML2019 Paper "Compositional Invariance Constraints for Graph Embeddings"

Dependencies NOTE: This code has been updated, if you were using this repo earlier and experienced issues that was due to an outaded codebase. Please

Avishek (Joey) Bose 43 Nov 25, 2022
A framework for large scale recommendation algorithms.

A framework for large scale recommendation algorithms.

Alibaba Group - PAI 880 Jan 03, 2023
Cross-Domain Recommendation via Preference Propagation GraphNet.

PPGN Codes for CIKM 2019 paper Cross-Domain Recommendation via Preference Propagation GraphNet. Citation Please cite our paper if you find this code u

Information Retrieval Group, Wuhan University, China 20 Dec 15, 2022
Detecting Beneficial Feature Interactions for Recommender Systems, AAAI 2021

Detecting Beneficial Feature Interactions for Recommender Systems (L0-SIGN) This is our implementation for the paper: Su, Y., Zhang, R., Erfani, S., &

26 Nov 22, 2022
6002project-rl - An implemention of offline RL on recommender system

An implemention of offline RL on recommender system @author: misajie @update: 20

Tzay Lee 3 May 24, 2022
A Python implementation of LightFM, a hybrid recommendation algorithm.

LightFM Build status Linux OSX (OpenMP disabled) Windows (OpenMP disabled) LightFM is a Python implementation of a number of popular recommendation al

Lyst 4.2k Jan 02, 2023
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
Bundle Graph Convolutional Network

Bundle Graph Convolutional Network This is our Pytorch implementation for the paper: Jianxin Chang, Chen Gao, Xiangnan He, Depeng Jin and Yong Li. Bun

55 Dec 25, 2022
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
Accuracy-Diversity Trade-off in Recommender Systems via Graph Convolutions

Accuracy-Diversity Trade-off in Recommender Systems via Graph Convolutions This repository contains the code of the paper "Accuracy-Diversity Trade-of

2 Sep 16, 2022
Jointly Learning Explainable Rules for Recommendation with Knowledge Graph

Jointly Learning Explainable Rules for Recommendation with Knowledge Graph

57 Nov 03, 2022
A library of Recommender Systems

A library of Recommender Systems This repository provides a summary of our research on Recommender Systems. It includes our code base on different rec

MilaGraph 980 Jan 05, 2023