All Projects → vaticle → kglib

vaticle / kglib

Licence: Apache-2.0 license
TypeDB-ML is the Machine Learning integrations library for TypeDB

Programming Languages

python
139335 projects - #7 most used programming language
Starlark
911 projects

Projects that are alternatives of or similar to kglib

Kglib
Grakn Knowledge Graph Library (ML R&D)
Stars: ✭ 405 (-22.56%)
Mutual labels:  graphs, ml, knowledge-graph, knowledgebase
Stellargraph
StellarGraph - Machine Learning on Graphs
Stars: ✭ 2,235 (+327.34%)
Mutual labels:  graphs, link-prediction, graph-convolutional-networks, geometric-deep-learning
gnn-lspe
Source code for GNN-LSPE (Graph Neural Networks with Learnable Structural and Positional Representations), ICLR 2022
Stars: ✭ 165 (-68.45%)
Mutual labels:  graphs, geometric-deep-learning
disparity filter
Implements a disparity filter in Python, based on graphs in NetworkX, to extract the multiscale backbone of a complex weighted network (Serrano, et al., 2009)
Stars: ✭ 17 (-96.75%)
Mutual labels:  graphs, graph-networks
Cleora
Cleora AI is a general-purpose model for efficient, scalable learning of stable and inductive entity embeddings for heterogeneous relational data.
Stars: ✭ 303 (-42.07%)
Mutual labels:  graphs, ml
Ampligraph
Python library for Representation Learning on Knowledge Graphs https://docs.ampligraph.org
Stars: ✭ 1,662 (+217.78%)
Mutual labels:  knowledge-graph, relational-learning
Datasets knowledge embedding
Datasets for Knowledge Graph Completion with textual information about the entities
Stars: ✭ 116 (-77.82%)
Mutual labels:  knowledge-graph, knowledgebase
gcnn keras
Graph convolution with tf.keras
Stars: ✭ 47 (-91.01%)
Mutual labels:  graphs, graph-networks
OLGA
an Ontology SDK
Stars: ✭ 36 (-93.12%)
Mutual labels:  knowledge-graph, knowledgebase
awesome-knowledge-graphs
Graph databases, Knowledge Graphs, SPARQ
Stars: ✭ 56 (-89.29%)
Mutual labels:  graphs, knowledge-graph
Simple
SimplE Embedding for Link Prediction in Knowledge Graphs
Stars: ✭ 104 (-80.11%)
Mutual labels:  knowledge-graph, knowledgebase
KBE
Node.js application to extract the knowledge represented in Google infoboxes (aka Google Knowlege Graph Panel)
Stars: ✭ 27 (-94.84%)
Mutual labels:  knowledge-graph, knowledgebase
Open Semantic Entity Search Api
Open Source REST API for named entity extraction, named entity linking, named entity disambiguation, recommendation & reconciliation of entities like persons, organizations and places for (semi)automatic semantic tagging & analysis of documents by linked data knowledge graph like SKOS thesaurus, RDF ontology, database(s) or list(s) of names
Stars: ✭ 98 (-81.26%)
Mutual labels:  knowledge-graph, knowledgebase
Piggydb
Piggydb is a Web notebook application that provides you with a platform to build your knowledge personally or collaboratively.
Stars: ✭ 130 (-75.14%)
Mutual labels:  knowledge-graph, knowledgebase
Geistmap
An experimental personal knowledge base with a focus on connections
Stars: ✭ 425 (-18.74%)
Mutual labels:  knowledge-graph, knowledgebase
PaperMachete
A project that uses Binary Ninja and GRAKN.AI to perform static analysis on binary files with the goal of identifying bugs in software.
Stars: ✭ 49 (-90.63%)
Mutual labels:  knowledge-graph, grakn
STransE
STransE: a novel embedding model of entities and relationships in knowledge bases (NAACL 2016)
Stars: ✭ 50 (-90.44%)
Mutual labels:  knowledge-graph-completion, link-prediction
NBFNet
Official implementation of Neural Bellman-Ford Networks (NeurIPS 2021)
Stars: ✭ 106 (-79.73%)
Mutual labels:  knowledge-graph, link-prediction
Graph nets
Build Graph Nets in Tensorflow
Stars: ✭ 5,051 (+865.77%)
Mutual labels:  graphs, graph-networks
BiLSTM-and-CNN-for-Link-Prediction
Keras implementation of path-based link prediction model for knowledge graph completion
Stars: ✭ 17 (-96.75%)
Mutual labels:  knowledge-graph, knowledge-graph-completion

GitHub release Discord Discussion Forum Stack Overflow Stack Overflow

TypeDB-ML

Previously known as KGLIB.

TypeDB-ML provides tools to enable graph algorithms and machine learning with TypeDB.

There are integrations for NetworkX and for PyTorch Geometric (PyG).

NetworkX integration allows you to use a large library of algorithms over graph data exported from TypeDB.

PyTorch Geometric (PyG) integration gives you a toolbox to build Graph Neural Networks (GNNs) for your TypeDB data, with an example included for link prediction (or: binary relation prediction, in TypeDB terms). The structure of the GNNs are totally customisable, with network components for popular topics such as graph attention and graph transformers built-in.

Features

NetworkX

  • Declare the graph structure of your queries, with optional sampling functions.
  • Query a TypeDB instance and combine many results across many queries into a single graph (build_graph_from_queries).

PyTorch Geometric

  • A DataSet object to lazily load graphs from a TypeDB instance. Each graph is converted to a PyG Data object.
  • It's most natural to work with PyG HeteroData objects since all data in TypeDB has a type. Conversion from Data to HeteroDatais available in PyG, but it loses node ordering information. To remedy this, TypeDB-ML provides store_concepts_by_type to store concepts consistent with a HeteroData object. This enables concepts to be properly re-associated with predictions after learning is finished.
  • A FeatureEncoder to orchestrate encoders to generate features for graphs.
  • Encoders for Continuous and Categorical values to apply encodings/embedding spaces to the types and attribute values present in TypeDB data.
  • A full example for link prediction

Other

  • Example usage of Tensorboard for PyG HeteroData

Resources

You may find the following resources useful, particularly to understand why TypeDB-ML started:

Quickstart

Install

  • Python >= 3.7.x

  • Grab the requirements.txt file from here and install the requirements with pip install -r requirements.txt. This is due to some intricacies installing PyG's dependencies, see here for details.

  • Installed TypeDB-ML: pip install typedb-ml.

  • TypeDB 2.11.1 running in the background.

  • typedb-client-python 2.11.x (PyPi, GitHub release). This should be installed automatically when you pip install typedb-ml.

Run the Example

Take a look at the PyTorch Geometric heterogeneous link prediction example to see how to use TypeDB-ML to build a GNN on TypeDB data.

Development

To follow the development conversation, please join the Vaticle Discord, and join the #typedb-ml channel. Alternatively, start a new topic on the Vaticle Discussion Forum.

TypeDB-ML requires that you have migrated your data into a TypeDB or TypeDB Cluster instance. There is an official examples repo for how to go about this, and information available on migration in the docs. Alternatively, there are fantastic community-led projects growing in the TypeDB OSI to facilitate fast and easy data loading, for example TypeDB Loader.

Building from Source

It's expected that you will use Pip to install, but should you need to make your own changes to the library, and import it into your project, you can build from source as follows:

Clone TypeDB-ML:

git clone [email protected]:vaticle/typedb-ml.git

Go into the project directory:

cd typedb-ml

Build all targets:

bazel build //...

Run all tests. Requires Python 3.7+ on your PATH. Test dependencies are for Linux since that is the CI environment:

bazel test //typedb_ml/... --test_output=streamed --spawn_strategy=standalone --action_env=PATH

Build the pip distribution. Outputs to bazel-bin:

bazel build //:assemble-pip
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].