This repository contains a implementation of our "Logical Relation Modeling and Mining in Hyperbolic Space for Recommendation".
- torch 1.13.0
- Python 3.8.13
- geoopt (
$ pip install git+https://github.com/geoopt/geoopt.git) - numpy
- scipy
- pandas
- tqdm
We provide one dataset, ciao.
adj_csr.npz adj matrix built for training gcn.
item_tag_matrix.npz items attributes matrix.
train.pkl train set.
test.pkl test set.
user_item_list.pkl user-item dict for the complete dataset.
implication.pt the hierarchies between tags.
exclusion.pt the exclusions between tags.
The implementation of model(model.py).
code to implement Hyperbolic gcn (encoders.py, hyp_layers.py).
data_generator.py read and organize data.
helper.py some method for helping preprocess data or set seeds and devices.
sampler.py a parallel sampler to sample batches for training.
train_utils.py read and parse the config arguments.
python run.py
python run.py > logs/ciao.log