Mitigating Heterogeneity among Factor Tensors via Lie Group Manifolds for Tensor Decomposition Based Temporal Knowledge Graph Embedding
Create a conda environment with pytorch and scikit-learn :
conda create --name tkbc_env python=3.x
source activate tkbc_env
conda install --file requirements.txt -c pytorch
Then install the kbc package to this environment
python setup.py install
We provide the downloaded data at tkbc/src_data
Once the datasets are downloaded, go to the tkbc/ folder and add them to the package data folder by running :
python tkbc/process.py
This will create the files required to compute the filtered metrics.
# ICEWS14
python tkbc/learner.py --dataset ICEWS14 --model TeAST --rank 128 --emb_reg 1e-2 --time_reg 1e-2
python tkbc/learner.py --dataset ICEWS14 --model TComplEx --rank 128 --emb_reg 1e-2 --time_reg 1e-2
python tkbc/learner.py --dataset ICEWS14 --model TNTcomplEx --rank 128 --emb_reg 1e-2 --time_reg 1e-2
python tkbc/learner.py --dataset ICEWS14 --model TeLM --rank 121 --emb_reg 1e-2 --time_reg 1e-2
# ICEWS05-15
python tkbc/learner.py --dataset ICEWS05-15 --model TeAST --rank 128 --emb_reg 1e-3 --time_reg 1
python tkbc/learner.py --dataset ICEWS05-15 --model TComplEx --rank 128 --emb_reg 1e-3 --time_reg 1
python tkbc/learner.py --dataset ICEWS05-15 --model TNTcomplEx --rank 128 --emb_reg 1e-3 --time_reg 1
python tkbc/learner.py --dataset ICEWS05-15 --model TeLM --rank 121 --emb_reg 1e-3 --time_reg 1
MIT licensed, as found in the LICENSE file.
We refer to the code of TNTComplEx and TeLM. Thanks for their great contributions!