Reader small image

You're reading from  Graph Data Science with Neo4j

Product typeBook
Published inJan 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781804612743
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Estelle Scifo
Estelle Scifo
author image
Estelle Scifo

Estelle Scifo possesses over 7 years experience as a data scientist, after receiving her PhD from the Laboratoire de lAcclrateur Linaire, Orsay (affiliated to CERN in Geneva). As a Neo4j certified professional, she uses graph databases on a daily basis and takes full advantage of its features to build efficient machine learning models out of this data. In addition, she is also a data science mentor to guide newcomers into the field. Her domain expertise and deep insight into the perspective of the beginners needs make her an excellent teacher.
Read more about Estelle Scifo

Right arrow

Exercises

Practice with the Pregel API and write an algorithm. If you need some intermediate steps, here are a couple of exercises to help you get started:

  1. Update the Python implementation so that it computes the normalized PageRank given by the following formula:

Here, N is the total number of nodes in the graph.

Warning: Be careful with the score initialization.

  1. Again, using the Python implementation, take into account relationship weights. Hint: Relationship weights are entered into the outgoing degree part of the formula.
  2. Update the Java implementation to track the PR values at each step. We want to be able to see the evolution of PR at each iteration when calling the algorithm in Cypher.

This means adding a new field to our schema of the double[] type and extending it at each iteration.

lock icon
The rest of the page is locked
Previous PageNext Chapter
You have been reading a chapter from
Graph Data Science with Neo4j
Published in: Jan 2023Publisher: PacktISBN-13: 9781804612743

Author (1)

author image
Estelle Scifo

Estelle Scifo possesses over 7 years experience as a data scientist, after receiving her PhD from the Laboratoire de lAcclrateur Linaire, Orsay (affiliated to CERN in Geneva). As a Neo4j certified professional, she uses graph databases on a daily basis and takes full advantage of its features to build efficient machine learning models out of this data. In addition, she is also a data science mentor to guide newcomers into the field. Her domain expertise and deep insight into the perspective of the beginners needs make her an excellent teacher.
Read more about Estelle Scifo