# Online Meetup: Link Prediction with Neo4j

**URL:** <https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952>\
**Category:** Community Content & Blogs\
**Created:** [March 21, 2019, 4:11pm UTC](https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952 "2019-03-21T16:11:56Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![neo4j\_devrel](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/neo4j_devrel/32/18147_2.png) [@neo4j\_devrel](https://community.neo4j.com/u/neo4j_devrel)\
**Post date:** [March 21, 2019, 4:11pm UTC](https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952/1 "2019-03-21T16:11:56Z")

</div>

Link prediction explores the problem of predicting new relationships in a graph based on the topology that already exists.

This has been an area of research for many years, and in the last month we've introduced link prediction algorithms to the Neo4j Graph Algorithms library.

In this session Amy and Mark explain the problem in more detail, describe the approaches that can be taken, and the challenges that have to be addressed.

We finish by going through a worked example showing how to apply these approaches using Graph Algorithms and the popular sciki-learn machine learning library.

Presenters: @AmyH & @mark.needham

---

<div class="post-metadata">

**Author:** ![mike](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/mike/32/334_2.png) [@mike](https://community.neo4j.com/u/mike)\
**Post date:** [March 21, 2019, 6:16pm UTC](https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952/2 "2019-03-21T18:16:22Z")

</div>

@AmyH @mark.needham @neo4j_devrel  
enjoyed the presentation just now. Here's a good paper on fraud prediction using graph analysis, specifically applying to time-weighted bipartite graphs (which I think you mentioned you would be moving on to shortly?)

> **[\[PDF\] GOTCHA! Network-Based Fraud Detection for Social Security Fraud |...](https://www.semanticscholar.org/paper/GOTCHA%21-Network-Based-Fraud-Detection-for-Social-Vlasselaer-Eliassi-Rad/11517fe04965c01b34b679985bc626608224a7fd?p2df)**
>
> It is found that domain-driven network variables have a significant impact on detecting past and future frauds and improve the baseline by detecting up to 55% additional fraudsters over time. We study the impact of network information for social...

---

<div class="post-metadata">

**Author:** ![antonio.cicchetti](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/antonio.cicchetti/32/1310_2.png) [@antonio.cicchetti](https://community.neo4j.com/u/antonio.cicchetti)\
**Post date:** [March 21, 2019, 7:51pm UTC](https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952/3 "2019-03-21T19:51:45Z")

</div>

Indeed a very interesting meetup, thanks! I am using a combination of similarity and community detection algorithms, since as Mark noted at the end of the video, the current community algorithms work only if you try to build-up groups of same node-type linked by a certain relationship. In general I have noticed that there is a less powerful support for complex relations between nodes. Already for similarity algorithms, if you have relationships with properties it gets very complicated to run the algorithms. E.g., imagine to have (RESEARCHER)-[:IS\_RELATED {role:author | reviewer | editor}]-(PAPER)-[:INCLUDES]-(RESEARCH\_TOPIC) and would like to elicit relationships between the researcher role and the research topic. I guess that at now the only feasible way is to "flatten" :IS\_RELATED into three separate relationships between RESEARCHER and PAPER.

---

<div class="post-metadata">

**Author:** ![oleg\_neo4j](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/oleg_neo4j/32/33578_2.png) [@oleg\_neo4j](https://community.neo4j.com/u/oleg_neo4j)\
**Post date:** [March 21, 2019, 9:35pm UTC](https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952/4 "2019-03-21T21:35:53Z")

</div>

Thank you for your meetups! :) I have a question/request... is/would it be possible to create a Bayesian network from data using Neo4j? Something Weka and BayesiaLab do is create a network from data on which you're able to set evidence/observation on a node and see the probabilities change for all the other nodes, showing which are the most influential on the observed node. I've searched for Bayesian network and Neo4j but there's not much available. Thank you again!

---

<div class="post-metadata">

**Author:** ![subhodip.pal](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/subhodip.pal/32/3875_2.png) [@subhodip.pal](https://community.neo4j.com/u/subhodip.pal)\
**Post date:** [March 25, 2019, 9:53pm UTC](https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952/5 "2019-03-25T21:53:46Z")

</div>

@mark.needham  
@AmyH  
Thanks for the wonderful session on Link Prediction. The material/algorithm covered in the session is very helpful to recommend /predict similar Items/Friend in an already connected network but if we are starting with absolutely unconnected data how should we link similar items based on their properties . For example if there is a database of Food items , how would we determine looking **into the ingredients** that Milk is closely related to Skim Milk and Almond Milk but distantly related to Yogurt and not at all related to Peanuts , so that we can then use something like Adamic Ader to close the triangle between Skim Milk and Almond Milk

---

<div class="post-metadata">

**Author:** ![greta](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/greta/32/56_2.png) [@greta](https://community.neo4j.com/u/greta)\
**Post date:** [April 12, 2019, 7:36am UTC](https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952/6 "2019-04-12T07:36:57Z")

</div>

Thanks for submitting!

I've added a tag that allows your blog to be displayed on the community home page!

---

<div class="post-metadata">

**Author:** ![duane\_nickull](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/duane_nickull/32/3288_2.png) [@duane\_nickull](https://community.neo4j.com/u/duane_nickull)\
**Post date:** [April 16, 2019, 7:50pm UTC](https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952/7 "2019-04-16T19:50:04Z")

</div>

Thank you both for sharing! I am currently working on a prototype for similar purposes.

---

<div class="post-metadata">

**Author:** ![amy.hodler](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/amy.hodler/32/4584_2.png) [@amy.hodler](https://community.neo4j.com/u/amy.hodler)\
**Post date:** [April 28, 2019, 4:15pm UTC](https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952/8 "2019-04-28T16:15:11Z")

</div>

Thanks Mike. I'll take a look at the paper.

---

<div class="post-metadata">

**Author:** ![amy.hodler](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/amy.hodler/32/4584_2.png) [@amy.hodler](https://community.neo4j.com/u/amy.hodler)\
**Post date:** [April 28, 2019, 4:36pm UTC](https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952/9 "2019-04-28T16:36:50Z")

</div>

Thanks for your question! There are many ways you could approach creating your relationships. Since you're still building your model, below are a few resources that are helpful:

- Data Modeling info - [Graph Modeling Guidelines - Developer Guides](https://neo4j.com/developer/guide-data-modeling/)
- NLP example from our partner GraphAware - [Reverse Engineering Book Stories with Neo4j and GraphAware NLP | GraphAware](https://graphaware.com/neo4j/2017/07/24/reverse-engineering-book-stories-nlp.html)
- Gousto use case that you might find interesting - [Neo4j + Gousto Case Study](https://neo4j.com/case-studies/gousto/)
- Similarity Algos in Neo4j (check out overlap similarity as it might help build your hierarchies) [Similarity - Neo4j Graph Data Science](https://neo4j.com/docs/graph-algorithms/current/algorithms/similarity/)

Best of luck!  
Amy

---

<div class="post-metadata">

**Author:** ![tiwari.milind](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/tiwari.milind/32/2451_2.png) [@tiwari.milind](https://community.neo4j.com/u/tiwari.milind)\
**Post date:** [June 27, 2019, 7:05am UTC](https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952/10 "2019-06-27T07:05:55Z")

</div>

How can I use Link Prediction Algorithms as part of my graph algorithm library. I am not able to access them in my Neo4J browser.

---

<div class="post-metadata">

**Author:** ![jennifer\_reif](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/jennifer_reif/32/8061_2.png) [@jennifer\_reif](https://community.neo4j.com/u/jennifer_reif)\
**Post date:** [August 12, 2019, 1:16pm UTC](https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952/11 "2019-08-12T13:16:22Z")

</div>

Hi, Tiwari! What version of Neo4j and the graph algorithms library are you running? What error are you getting when you try to run one of the Link Prediction algorithms in your Neo4j Browser?

Cheers,  
Jennifer

---

<div class="post-metadata">

**Author:** ![tiwari.milind](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/tiwari.milind/32/2451_2.png) [@tiwari.milind](https://community.neo4j.com/u/tiwari.milind)\
**Post date:** [August 12, 2019, 6:22pm UTC](https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952/12 "2019-08-12T18:22:49Z")

</div>

Dear Jennifer,

Greetings and hope you are doing well.

My version of Neo4J - Neo4j Desktop 3.5.6  
Version of Neo4j ML Model - neo4j-ml-models-1.0.0.jar.

When I install this library using the procedure mentioned in the following link my database stops working and I have to delete it.

[https://github.com/neo4j-graph-analytics/ml-models/releases](https://github.com/neo4j-graph-analytics/ml-models/releases)

---

<div class="post-metadata">

**Author:** ![jennifer\_reif](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/jennifer_reif/32/8061_2.png) [@jennifer\_reif](https://community.neo4j.com/u/jennifer_reif)\
**Post date:** [August 30, 2019, 8:44pm UTC](https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952/13 "2019-08-30T20:44:38Z")

</div>

Are you seeing an error message? Did you restart the database when you pulled in the jar file?

---

<div class="post-metadata">

**Author:** ![tiwari.milind](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/tiwari.milind/32/2451_2.png) [@tiwari.milind](https://community.neo4j.com/u/tiwari.milind)\
**Post date:** [August 30, 2019, 11:47pm UTC](https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952/14 "2019-08-30T23:47:11Z")

</div>

Yes, I did but the database fails to restart.

---

<div class="post-metadata">

**Author:** ![jennifer\_reif](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/jennifer_reif/32/8061_2.png) [@jennifer\_reif](https://community.neo4j.com/u/jennifer_reif)\
**Post date:** [September 26, 2019, 2:49pm UTC](https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952/15 "2019-09-26T14:49:16Z")

</div>

What is the error message? Can you send a screenshot of what happens when it fails?

Also, you can actually use Link Prediction algorithms by clicking `Manage` on your database and clicking install for graph algorithms. The ML Models jar is for graph embeddings, I believe. The instructions for installing graph algorithms plugin is also listed in one of my blog posts here: [Explore New Worlds — Adding Plugins to Neo4j | by Jennifer Reif | Neo4j Developer Blog | Medium](https://medium.com/neo4j/explore-new-worlds-adding-plugins-to-neo4j-26e6a8e5d37e)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![andysw90](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/andysw90/32/18412_2.png) [@andysw90](https://community.neo4j.com/u/andysw90)\
**Post date:** [May 25, 2021, 2:43pm UTC](https://community.neo4j.com/t/online-meetup-link-prediction-with-neo4j/5952/16 "2021-05-25T14:43:57Z")

</div>

Thanks for this super interesting and accessible session (I'm only 2 years late to the party!!). You mention towards the end that most of the methods discussed are relevant to monopartite networks: I was wondering if there was any update on deployment of Npartite-suitable methods in the GA library? Thanks a lot.
