cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Can't proceed with 04_Predictions.ipynb - Data Science with Neo4j

gigauser
Graph Buddy

I did follow the training well up to this step in the google jupyter notebook:
train_missing_links = graph.run("""
MATCH (author:Author)
WHERE (author)-[:CO_AUTHOR_EARLY]-()
MATCH (author)-[:CO_AUTHOR_EARLY*2..3]-(other)
WHERE not((author)-[:CO_AUTHOR_EARLY]-(other))
RETURN id(author) AS node1, id(other) AS node2, 0 AS label
""").to_data_frame()

Here it took forever not finished, so I tried it on the sandbox browser but it returned WebSocket fail after long time.

I changed it like this and could get the result within a minute:
MATCH (author:Author)
WHERE (author)-[:CO_AUTHOR_EARLY]-()
MATCH p = (author)-[:CO_AUTHOR_EARLY*2..3]-(other)
WHERE not((author)-[:CO_AUTHOR_EARLY]-(other))
return count(p)

Would you help me to run the original code to proceed the training?

2 REPLIES 2

Hello @gigauser,

From what you are describing, something in the graph went wrong, leading to a transaction that did not complete.

My suggestion is to create a new sandbox/jupyter environment and skip to that exercise.

Please keep in mind that this course uses the older Graph Algorithms Library that is supported with Neo4j 3.5. I strongly recommend that you take this newly-published course which is an update to this course for Neo4j 4.0 and uses the new Graph Data Science Library:

Using a Machine Learning Workflow for Link Prediction: https://neo4j.com/graphacademy/online-training/gds-data-science/

Elaine

Thank you for giving the tips. I tried several times but it didn't work but only the modified to get its aggregation like count(p) worked.
Now I gave it up and start the new training with Neo4j 4.0.

Dongho.