MCPcopy Index your code
hub / github.com/SamHaoYuan/DSANForAAAI2021

github.com/SamHaoYuan/DSANForAAAI2021 @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
187 symbols 423 edges 13 files 18 documented · 10%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Dual Sparse Attention Network For Session based Recommendation

This code is used to reproduce the main experiment of our paper.

Requirements

  • Python 3.6.8
  • Pytorch 1.2.0
  • entmax (pip install entmax)
  • Jupyter Notebbok

Datasets

  • DIGINETICA: http://cikm2016.cs.iupui.edu/cikm-cup or https://competitions.codalab.org/competitions/11161
  • RETAILROCKET: https://www.kaggle.com/retailrocket/ecommerce-dataset

Code

  • preprocess_rr: for RETAILROCKET dataset to generate session.
  • Preprocess: generate train and test set(for RETAILROCKET dataset, you need run preprocess_rr .py first)
  • Metric: HR and MRR
  • DualAdaptiveTrain: the model of DN dataset
  • DualAdaRR3: the model of RR dataset

BestModel

This folder contains the model that we have trained. Loading this model could directly check results.

Baselines

This folder contains all the baselines we compared in the paper.

For SKNN, STAN, STAMP, Bert4Rec, GC-SAN and CoSAN we implement them by ourselves referring to the original paper and open source implementation.

For GRU4Rec, SR-GNN, we use the author's source code and for FPMC we use the open source implementation.

Core symbols most depended-on inside this repo

load_data
called by 8
Preprocess_rr.py
filter_data
called by 7
Preprocess_rr.py
trans_to_cuda
called by 6
baselines/GCSAN.py
attention
called by 5
baselines/CoSAN/CoSAN.py
split_seq
called by 2
Preprocess_dn.py
filter_min_date
called by 2
Preprocess_rr.py
split_data_org
called by 2
Preprocess_rr.py
split_data
called by 2
Preprocess_rr.py

Shape

Method 102
Function 60
Class 25

Languages

Python100%

Modules by API surface

baselines/Bert4Rec.py40 symbols
baselines/STAMP.py32 symbols
baselines/GCSAN.py27 symbols
baselines/pop.py24 symbols
Preprocess_rr.py16 symbols
baselines/CoSAN/CoSAN.py13 symbols
baselines/KNN-based/STAN.py9 symbols
baselines/KNN-based/SKNN.py9 symbols
baselines/CoSAN/dataloader.py7 symbols
baselines/CoSAN/train.py4 symbols
Preprocess_dn.py4 symbols
metric.py2 symbols

For agents

$ claude mcp add DSANForAAAI2021 \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact