Coder Social home page Coder Social logo

cxjtju / ta_transe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bsantraigi/ta_transe

0.0 0.0 0.0 6.88 MB

Temporal Knowledge Graph Completion | Implementation of Temporal Knowledge Graph Completion following the work of Duran et al., Learning Sequence Encoders for Temporal Knowledge Graph Completion

Python 100.00%

ta_transe's Introduction

Code framework for Temporal KG completion.

Implementation of Temporal Knowledge Graph Completion following the work of Duran et al., Learning Sequence Encoders for Temporal Knowledge Graph Completion

  • Code:

    • modify based on knowledge_representation_pytorch

    • 1st column in train.txt - subject entity

    • 2nd column - relation

    • 3rd column - object entity

    • 4th column - time

    • 1st figure in stat.txt - number of entities

    • 2nd figure in stat.txt - number of relations

    used preprocess_TA_step1.py and preprocess_TA_step2.py to make data for TA_TransE.

    python preprocess_TA_step1.py ICEWS14
    python preprocess_TA_step2.py ICEWS14
    

    Note : data is already Preprocessed. if you have new data then you can follow the above Process i.e. "python preprocess_TA_step1.py ICEWS14"

  • TATransE.py : train code

  • You can run the code with

     python TA_TransE.py ICEWS14
     
    

    eg:

     cd ./baselines
     CUDA_VISIBLE_DEVICES=0 python TA_TransE.py -f 1 -d ICEWS14 -L 1 -bs 1024 -n 1000
    
    

Note: when you run the code like python "TA_TransE.py ICEWS14", you need to give dataset in argument with out _TA

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.