Giter VIP home page Giter VIP logo

neo4j-graph-algorithms's Introduction

Efficient Graph Algorithms for Neo4j

Build Status

This library provides efficiently implemented, parallel versions of common graph algorithms for Neo4j 3.x, exposed as Cypher procedures.

You can find documentation at neo4j.com/docs/graph-algorithms

Preview: Graph Data Science Library

We’re excited to have released a preview of the Graph Data Science (GDS) library, now available on our download center or via our github repo at https://github.com/neo4j/graph-data-science/.

This is an update to the graph algorithms library, featuing all of your favorite graph algorithms - and some new ones - plus a new, unified and simplified surface, improvements to the graph loaders, better error messaging, and additional features and workflows to support production scale deployments.

Documentation for the Graph Data Science Library is available here: https://neo4j.com/docs/graph-data-science/1.0-preview/

As we are in the process of migrating to the GDS library, please enter all github issues on the new repo

Download New Releases

Please go to the neo4j download center to download the newest release of the graph algos library: https://neo4j.com/download-center/

We’re hard at work improving and expanding our algorithms library, and while we sort out our code release process, please use the download center to find the most recent jar and release notes. Our current version is 3.5.14.0.

Graph Algorithms Book

Amy Hodler and Mark Needham recently finished writing the O’Reilly Graph Algorithms Book. For a limited time only, you can download your free copy from neo4j.com/graph-algorithms-book

OReilly Graph Algorithms v2 ol1 (1)

Algorithms

Graph algorithms are used to compute metrics for graphs, nodes, or relationships.

They can provide insights on relevant entities in the graph (centralities, ranking), or inherent structures like communities (community-detection, graph-partitioning, clustering).

Many graph algorithms are iterative approaches that frequently traverse the graph for the computation using random walks, breadth-first or depth-first searches, or pattern matching.

Due to the exponential growth of possible paths with increasing distance, many of the approaches also have high algorithmic complexity.

Fortunately, optimized algorithms exist that utilize certain structures of the graph, memoize already explored parts, and parallelize operations. Whenever possible, we’ve applied these optimizations.

The library supports the following algorithms:

Centralities

These algorithms determine the importance of distinct nodes in a network:

Community detection

These algorithms evaluate how a group is clustered or partitioned, as well as its tendency to strengthen or break apart:

Path finding

These algorithms help find the shortest path or evaluate the availability and quality of routes:

Similarity

These algorithms help calculate the similarity of nodes:

These algorithms can be used as part of Link Prediction solution:

Preprocessing

These are utility functions and procedures that transform data for use further along the data pipeline:

Installation

Neo4j Desktop

If we are using the Neo4j Desktop, the library can be installed from the 'Plugins' tab of a database.

neo4j desktop

The installer will download a copy of the graph algorithms library and place it in the 'plugins' directory of the database. It will also add the following entry to the settings file:

dbms.security.procedures.unrestricted=algo.*

Neo4j Server

If we are using a standalone Neo4j Server, the library will need to be installed and configured manually.

  1. Download graph-algorithms-algo-[version].jar from the matching release and copy it into the $NEO4J_HOME/plugins directory. We can work out which release to download by referring to the versions file.

  2. Add the following to your $NEO4J_HOME/conf/neo4j.conf file:

    dbms.security.procedures.unrestricted=algo.*

    We need to give the library unrestricted access because the algorithms use the lower level Kernel API to read from, and to write to Neo4j.

  3. Restart Neo4j

Verifying installation

Once we’ve installed the library, to see a list of all the algorithms, run the following query:

CALL algo.list()

You can also see the full list in the documentation.

Usage

These algorithms are exposed as Neo4j procedures. They can be called directly from Cypher in your Neo4j Browser, from cypher-shell, or from your client code.

For most algorithms there are two procedures:

  • algo.<name> - this procedure writes results back to the graph as node-properties, and reports statistics.

  • algo.<name>.stream - this procedure returns a stream of data. For example, node-ids and computed values.

    For large graphs, the streaming procedure might return millions, or even billions of results. In this case it may be more convenient to store the results of the algorithm, and then use them with later queries.

Feedback

We’d love your feedback, so please try out these algorithms and let us know how well they work for your use-case. Also please note things that are missing from the installation instructions or documentation.

Please raise GitHub issues for anything you encounter or join the Neo4j Community forum and ask in the Graph Algorithms Category

Building locally

Currently aiming at Neo4j 3.x (with a branch per version):

git clone https://github.com/neo4j-contrib/neo4j-graph-algorithms
cd neo4j-graph-algorithms
git checkout 3.3
mvn clean install
cp algo/target/graph-algorithms-*.jar $NEO4J_HOME/plugins/
$NEO4J_HOME/bin/neo4j restart

neo4j-graph-algorithms's People

Contributors

aliciaframe avatar darthmax avatar davidoliversp2 avatar fbiville avatar frant-hartm avatar jexp avatar jjaderberg avatar knutwalker avatar mats-sx avatar mknblch avatar mneedham avatar moxious avatar pstutz avatar ryguyrg avatar s1ck avatar tomasonjo avatar

Watchers

 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.