• Stars
    star
    585
  • Rank 73,751 (Top 2 %)
  • Language
    Java
  • License
    Other
  • Created over 4 years ago
  • Updated 3 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Source code for the Neo4j Graph Data Science library of graph algorithms.

Neo4j Graph Data Science

https://github.com/neo4j/graph-data-science/actions/workflows/gradle_cipr.yml https://search.maven.org/search?q=g:%22org.neo4j.gds%22%20AND%20a:%22proc%22 Documentation Discord Forums online status

This repository hosts the open sources of the Neo4j Graph Data Science (GDS) library. The GDS library is a plugin for the Neo4j graph database. GDS comprises graph algorithms, graph transformations, and machine learning pipelines, operated via Cypher procedures from within a Neo4j DBMS.

The Neo4j Graph Data Science library is the successor of the Neo4j Graph Algorithms library.

Downloading and installing releases

The latest releases of Neo4j Graph Data Science can always be found at the Neo4j Graph Data Science Download Page. To install the plugin into a Neo4j DBMS place the downloaded JAR file it in the plugins directory of your Neo4j database and restart the database. For further instructions, see our documentation.

If you are using Neo4j Desktop you can simply add the Graph Data Science library on the plugins page of your project.

When installing GDS manually, please refer to the below compatibility matrix:

Table 1. Compatibility matrix (italicized version is in development)

GDS version

Neo4j version

Java Version

GDS 2.4.x

Neo4j 5.8.0

Java 17

Neo4j 5.7.0

Neo4j 5.6.0

Neo4j 5.3.0

Neo4j 5.5.0

Neo4j 5.4.0

Neo4j 5.2.0

Neo4j 5.1.0

Neo4j 4.4.9 - 4.4.21

Java 11

GDS 2.3.x

Neo4j 5.8.0

Java 17

Neo4j 5.7.0

Neo4j 5.6.0

Neo4j 5.5.0

Neo4j 5.4.0

Neo4j 5.3.0

Neo4j 5.2.0

Neo4j 5.1.0

Neo4j 4.4.9 - 4.4.21

Java 11

Note
Preview releases are not automatically made available in Neo4j Desktop. They need to be installed manually.

OpenGDS

The Neo4j Graph Data Science library as built and distributed by Neo4j includes the sources in this repository as well a suite of closed sources. Neo4j GDS is available to download and use under the constraints of its license.

However, the sources in this repository can be also be assembled into a fully functioning library, which we call OpenGDS. OpenGDS is available to build, use, and extend under the constraints of the GNU Public License version 3.0.

Using the Pregel API

To build your own algorithms using the Pregel API (see at docs), we recommend starting with the pregel-bootstrap project.

Note
The module on master depends on the unpublished version of this library. The GDS version can be changed in the build.gradle of the pregel-bootstrap module.

Python client

The library comes with a Python client called graphdatascience. It enables users to write pure Python code to project graphs, run algorithms, as well as define and use machine learning pipelines in GDS.

The API is designed to mimic the GDS Cypher procedure API in Python code. It abstracts the necessary operations of the Neo4j Python driver to offer a simpler surface.

graphdatascience is only guaranteed to work with GDS versions 2.0+.

You can find the graphdatascience source code here.

Developing with OpenGDS

OpenGDS is also available on Maven Central. If you want to include the OpenGDS in your own project you can simply add it as a dependency.

For the most basic set of features, like graph loading and the graph representation, you need to include the core module:

<dependency>
  <groupId>org.neo4j.gds</groupId>
  <artifactId>core</artifactId>
  <version>2.3.7</version>
</dependency>

The algorithms are located in the algo-common, algo and alpha-algo modules:

<!-- Contains the basic algorithm infrastructure -->
<dependency>
  <groupId>org.neo4j.gds</groupId>
  <artifactId>algo-common</artifactId>
  <version>2.3.7</version>
</dependency>

<!-- Contains the productized algorithms -->
<dependency>
  <groupId>org.neo4j.gds</groupId>
  <artifactId>algo</artifactId>
  <version>2.3.7</version>
</dependency>

<!-- Contains some alpha algorithms -->
<dependency>
    <groupId>org.neo4j.gds</groupId>
    <artifactId>alpha-algo</artifactId>
    <version>2.3.7</version>
</dependency>

The procedures are located in the proc-common, proc and alpha-proc modules:

<!-- Contains the basic procedure infrastructure -->
<dependency>
  <groupId>org.neo4j.gds</groupId>
  <artifactId>proc-common</artifactId>
  <version>2.3.7</version>
</dependency>

<!-- Contains the productized algorithm procedures -->
<dependency>
  <groupId>org.neo4j.gds</groupId>
  <artifactId>proc</artifactId>
  <version>2.3.7</version>
</dependency>

<!-- Contains some alpha algorithm procedures-->
<dependency>
    <groupId>org.neo4j.gds</groupId>
    <artifactId>alpha-proc</artifactId>
    <version>2.3.7</version>
</dependency>

<!-- Required by the write execution modes, this artifact is responsible for providing the various exporters -->
<dependency>
  <groupId>org.neo4j.gds</groupId>
  <artifactId>open-write-services</artifactId>
  <version>2.3.7</version>
</dependency>

Building the library

Installing JDKs

Install SKDMAN

curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"

Install both JDK 11 and JDK 17 Temurin:

sdk install java 11.0.19-tem
sdk install java 17.0.7-tem
Note
These versions were the latest at the time of writing these notes. To see a list of the available versions you can run sdk list java.
Note
You do not need to set them as default JDK

If you want to opt out of Temurin, you can override javaLanguageVendor and javaLanguageVersion in your project-local gradle.properties. List of Gradle supported language vendors

Note
The javaLanguageVendor and javaLanguageVersion overrides have to be installed locally on your system.

OpenGDS uses the build tool Gradle. Gradle is shipped with this repository using the Gradle Wrapper. This means you can simply run any Gradle task by running ./gradlew TASK from the repository root.

By default we build against Neo4j version 4.4.x, which is defined in public/gradle/dependencies.gradle. Therefore, you either select JDK 11 or if you want to run with JDK 17, you add -Pneo4jVersion=5.1.0.

Running tests

To run all tests you can simply run ./gradlew check

Packaging the library

To package the library you can run ./gradlew :open-packaging:shadowCopy. This will create a bundled JAR called open-gds-VERSION.jar in the directory build/distributions/. To use the bundled JAR in Neo4j, place the JAR file in the plugins directory of your Neo4j database and restart the database. For further instructions, see our documentation.

Preview of the documentation

A preview of the latest documentation can be found at https://neo4j.com/docs/graph-data-science/preview/.

Contributing

Please report any bugs, concerns, or other questions as GitHub issues to this repository.

For more information see the contribution guidelines for this project.

License

OpenGDS is licensed under the GNU Public License version 3.0. All content is copyright Β© Neo4j Sweden AB.

More Repositories

1

neo4j

Graphs for Everyone
Java
12,473
star
2

NaLLM

Repository for the NaLLM project
TypeScript
952
star
3

neo4j-python-driver

Neo4j Bolt driver for Python
Python
864
star
4

neo4j-javascript-driver

Neo4j Bolt driver for JavaScript
JavaScript
832
star
5

neo4j-browser

Neo4j Browser is the general purpose user interface for working with Neo4j. Query, visualize, administrate and monitor the database.
TypeScript
651
star
6

graphql

A GraphQL to Cypher query execution layer for Neo4j and JavaScript GraphQL implementations.
TypeScript
485
star
7

neo4j-go-driver

Neo4j Bolt Driver for Go
Go
476
star
8

neo4j-java-driver

Neo4j Bolt driver for Java
Java
322
star
9

neo4j-ogm

Java Object-Graph Mapping Library for Neo4j
Java
322
star
10

docker-neo4j

Docker Images for the Neo4j Graph Database
Shell
307
star
11

neo4j-dotnet-driver

Neo4j Bolt driver for .NET
C#
218
star
12

graph-data-science-client

A Python client for the Neo4j Graph Data Science (GDS) library
Python
168
star
13

neo4j-documentation

Scala
99
star
14

trillion-graph

A scale demo of Neo4j Fabric spanning up to 1129 machines/shards running a 100TB (LDBC) dataset with 1.2tn nodes and relationships.
Java
89
star
15

cypher-shell

Cypher Shell has moved to https://github.com/neo4j/neo4j
Java
88
star
16

docker-neo4j-publish

Shell
82
star
17

sdn-rx

Nextgen Spring Data module for Neo4j supporting (not only) reactive data access and immutable support
Java
66
star
18

apoc

Java
63
star
19

helm-charts

Go
51
star
20

cypher-editor

Codemirror editor for Cypher, with syntax awareness and auto-completion
JavaScript
41
star
21

cypher-builder

A programmatic API for building Cypher queries for Neo4j.
TypeScript
35
star
22

neo4j-java-driver-spring-boot-starter

Automatic configuration of Neo4j's Java Driver for Spring Boot applications
Java
35
star
23

cypher-language-support

Neo4j's Cypher Language support
TypeScript
24
star
24

neo4j-example-auth-plugins

Example authentication and authorization plugins for Neo4j
Java
17
star
25

graphql-tracker-temp

This is a temporary repository for documentation and tracking issues for the @neo4j/graphql package until that repo is made public
12
star
26

graph-schema-introspector

This is a Proof of concept (PoC) for a Neo4j schema introspector that produces output in JSON format validating against graph-schema-json-js-utils.
Java
11
star
27

neo4j-ogm-quarkus

Quarkus extension to that allows proper usage of Neo4j-OGM inside Quarkus.
Java
10
star
28

docs-drivers

Neo4j Drivers Documentation
HTML
8
star
29

windows-wrapper

A service wrapper for windows
Java
8
star
30

neo4j.github.com

Web published resources
HTML
7
star
31

docs-cypher

Neo4j Cypher Documentation
JavaScript
7
star
32

docs-bolt

Neo4j Bolt Protocol Documentation
JavaScript
6
star
33

jsr311-api

Forked from revision 612
Java
6
star
34

dappr

Distributed Approximate Personalised PageRank
Jupyter Notebook
5
star
35

doctools

Perl
5
star
36

neo4j-jdbc

Official Neo4j JDBC Driver (EAP)
Java
5
star
37

github-action-traceability

TypeScript
4
star
38

graph-schema-json-js-utils

Utility library to work with the Graph Schema JSON representation
TypeScript
4
star
39

parents

Neo4j Build Configuration
4
star
40

docs-operations

Neo4j Operations documentation
JavaScript
3
star
41

docs-getting-started

JavaScript
3
star
42

docs-http-api

Documentation for Neo4j HTTP API
JavaScript
3
star
43

neo4j-aws-terraform

HCL
3
star
44

jbang-catalog

JBang catalog
Java
2
star
45

graphql-toolbox

TypeScript
2
star
46

import-spec

Java
2
star
47

docs-graphql

GraphQL docs
JavaScript
2
star
48

docs-maven-plugin

Java
2
star
49

ease-maven-plugin

Java
2
star
50

license-maven-plugin

Fork of http://code.google.com/p/maven-license-plugin/
Java
2
star
51

docs-status-codes

Documentation for Neo4j status codes
JavaScript
2
star
52

maven-skin

Neo4j Maven Skin
Java
2
star
53

docs-aura

Jupyter Notebook
2
star
54

azure-neo4j

Azure topology files
Shell
1
star
55

clirr-maven-plugin

Java
1
star
56

neo4jtester

neo4j tester
Go
1
star
57

docs-ops-manager

JavaScript
1
star