Git Product home page Git Product logo

ptranse-ag's Introduction

PTransE-ag

PTransE-ag (path-based TransE with aggregation) is a method for knowledge graph embedding. Note that our work is based on PTransE. Therefore, the code is modified based on PTransE (https://github.com/thunlp/KB2E). Here I only supply dataset FB15K. You can access https://github.com/thunlp/KB2E for more datasets.

training

You need to run PCRA.py firstly to generate required files. Then modify the files' paths in Test_Train_path.cpp and Train_PTransE-ag.cpp. Parameter beta is required for running trainning. For our paper's result, you can run ./Train_PTransE-ag 0.5.

testing

According to the beta passed in training, run ./Test_PTransE-ag beta for evaluating.

updating(2019/2/23)

execute ./Train_PTransE-pos 1

ptranse-ag's People

Contributors

idelcoder avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

ptranse-ag's Issues

PCRA.py 中的问题

id2relation[int(seg[1])+ relation_num]="~"+seg[0]

你既然是添加的反向关系,那么PCRA中这行 代码,
id 为0 的关系反向向量 也是0 这不是覆盖了吗?
还有个问题:有 degree 文件生成的脚本吗?

关于confidence问题

// confidence存放的是每条路径对于每个关系的置信度。比如e1-r1-e2,直连的关系是r1,e3-r2-e4的直连关系是r2。
// 假设图中只有e1-e2和e3-e4之间存在路径r3-r4。那么,r3-r4只对r1和r2存在置信度,且均是0.5。

请问这句话怎么理解?
r3-r4是哪两个实体之间的关系路径?

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.