GithubHelp home page GithubHelp logo

greysun / ampligraph Goto Github PK

View Code? Open in Web Editor NEW

This project forked from accenture/ampligraph

0.0 2.0 0.0 17.1 MB

Python library for Representation Learning on Knowledge Graphs

License: Apache License 2.0

Python 99.71% Shell 0.29%

ampligraph's Introduction

AmpliGraph

DOI

Documentation Status

Open source Python library that predicts links between concepts in a knowledge graph.

AmpliGraph is a suite of neural machine learning models for relational Learning, a branch of machine learning that deals with supervised learning on knowledge graphs.

Use AmpliGraph if you need to:

  • Discover new knowledge from an existing knowledge graph.
  • Complete large knowledge graphs with missing statements.
  • Generate stand-alone knowledge graph embeddings.
  • Develop and evaluate a new relational model.

AmpliGraph's machine learning models generate knowledge graph embeddings, vector representations of concepts in a metric space:

It then combines embeddings with model-specific scoring functions to predict unseen and novel links:

Key Features

  • Intuitive APIs: AmpliGraph APIs are designed to reduce the code amount required to learn models that predict links in knowledge graphs.
  • GPU-Ready: AmpliGraph is based on TensorFlow, and it is designed to run seamlessly on CPU and GPU devices - to speed-up training.
  • Extensible: Roll your own knowledge graph embeddings model by extending AmpliGraph base estimators.

Modules

AmpliGraph includes the following submodules:

  • KG Loaders: Helper functions to load datasets (knowledge graphs).
  • Latent Feature Models: knowledge graph embedding models. AmpliGraph contains: TransE, DistMult, ComplEx, HolE. (More to come!)
  • Evaluation: Metrics and evaluation protocols to assess the predictive power of the models.

Installation

Prerequisites

  • Linux Box
  • Python โ‰ฅ 3.6

Provision a Virtual Environment

Create and activate a virtual environment (conda)

conda create --name ampligraph python=3.6
source activate ampligraph

Install TensorFlow

AmpliGraph is built on TensorFlow 1.x. Install from pip or conda:

CPU-only

pip install tensorflow==1.12.0

or

conda install tensorflow=1.12.0

GPU support

pip install tensorflow-gpu==1.12.0

or

conda install tensorflow-gpu=1.12.0

Install AmpliGraph

Install the latest stable release from pip:

pip install ampligraph

If instead you want the most recent development version, you can clone the repository and install from source (your local working copy will be on the latest commit on the develop branch). The code snippet below will install the library in editable mode (-e):

git clone https://github.com/Accenture/AmpliGraph.git
cd AmpliGraph
pip install -e .

Sanity Check

>> import ampligraph
>> ampligraph.__version__
'1.0.2'

Predictive Power Evaluation (MRR Filtered)

FB15k WN18 WN18RR FB15K-237 YAGO3-10
TransE 0.55 0.50 0.23 0.31 0.24
DistMult 0.79 0.83 0.44 0.29 0.49
ComplEx 0.79 0.94 0.44 0.30 0.50
HolE 0.80 0.94 0.47 0.28 0.50

Documentation

Documentation available here

The project documentation can be built from your local working copy with:

cd docs
make clean autogen html

How to contribute

See guidelines from AmpliGraph documentation.

How to Cite

If you like AmpliGraph and you use it in your project, why not starring the project on GitHub!

GitHub stars

If you instead use AmpliGraph in an academic publication, cite as:

@misc{ampligraph,
 author= {Luca Costabello and
          Sumit Pai and
          Chan Le Van and
          Rory McGrath and
          Nicholas McCarthy},
 title = {{AmpliGraph: a Library for Representation Learning on Knowledge Graphs}},
 month = mar,
 year  = 2019,
 doi   = {10.5281/zenodo.2595043},
 url   = {https://doi.org/10.5281/zenodo.2595043}
}

License

AmpliGraph is licensed under the Apache 2.0 License.

ampligraph's People

Contributors

cclauss avatar chanlevan avatar iamaziz avatar lukostaz avatar nicholasmccarthy avatar pyvandenbussche avatar sumitpai avatar

Watchers

 avatar  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.