Getting started
After installation, you can start using the GDS library in two main ways:
-
To run one or more algorithms on an in-memory graph, inspect the result of the computation, and potentially write it back to Neo4j.
-
To configure a machine learning pipeline and use it to train a model, then use the model for prediction.
You can run all GDS Cypher procedures in the Neo4j Browser or via a Neo4j driver.
Algorithms
The typical workflow with GDS algorithms is as follows:
-
Project an in-memory graph from the Neo4j database.
-
Choose an appropriate algorithm.
-
Run the algorithm in one of the execution modes.
-
Use the
stream
mode to retrieve the output of the algorithm as a query result. -
Use the
mutate
mode to update the in-memory graph with the output of the algorithm. -
Use the
write
mode to write the output of the algorithm back to the Neo4j database.
-
-
(Optional) Choose and run more algorithms.
The Basic workflow and the End-to-end workflow examples show this workflow with a single algorithm and a sequence of algorithms.
Machine learning pipelines
Machine learning pipelines streamline the common phases of graph machine learning workflows such as node classification, link prediction, and node regression, making it convenient to train models and use them for prediction.
The typical workflow with a machine learning pipeline in GDS is as follows:
-
Configure a pipeline.
-
Use the pipeline to train a model.
-
Used the trained model for prediction.
-
Use the
stream
mode to retrieve the predicted values as a query result. -
Use the
mutate
mode to update the in-memory graph with the predicted values. -
Use the
write
mode to write the predicted values back to the Neo4j database.
-
The Machine learning pipeline example shows how to configure and use a basic Link Prediction pipeline.