GithubHelp home page GithubHelp logo

gzupanda / drum Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alisadeghian/drum

0.0 0.0 0.0 5.8 MB

DRUM end to end differentiable rule mining on knowledge graphs

Shell 2.30% Python 97.70%

drum's Introduction

DRUM: End-To-End Differentiable Rule Mining On Knowledge Graphs

This is the implementation of DRUM, proposed in the following paper:

DRUM: End-To-End Differentiable Rule Mining On Knowledge Graphs. Ali Sadeghian, Mohammadreza Armandpour, Patrick Ding, Daisy Zhe Wang. NeurIPS 2019.

Requirements

  • Python 2.7
  • Numpy
  • Tensorflow 1.13.1

Quick start

The following command starts training a dataset about family relations, and stores the experiment results in the folder exps/demo/.

python src/main.py --datadir=datasets/family --exps_dir=exps/ --exp_name=demo

To get the best performance, use different ranks for different datasets, default value is set to 3.

Evaluation

To evaluate the prediction results, follow the steps below. The first two steps is preparation so that we can compute filtered ranks (see TransE for details).

We use the experiment from Quick Start as an example. Change the folder names (datasets/family, exps/dev) for other experiments.

. eval/collect_all_facts.sh datasets/family
python eval/get_truths.py datasets/family
python eval/evaluate.py --preds=exps/demo/test_predictions.txt --truths=datasets/family/truths.pckl

This code partially borrows from Neural LP.

drum's People

Contributors

alisadeghian avatar

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.