# Neo4j GDS Java API

**URL:** <https://community.neo4j.com/t/neo4j-gds-java-api/64803>\
**Category:** Neo4j Graph Platform\
**Tags:** data-science\
**Created:** [November 2, 2023, 6:04pm UTC](https://community.neo4j.com/t/neo4j-gds-java-api/64803 "2023-11-02T18:04:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xar.zax](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/xar.zax/32/32533_2.png) [@xar.zax](https://community.neo4j.com/u/xar.zax)\
**Post date:** [November 2, 2023, 6:04pm UTC](https://community.neo4j.com/t/neo4j-gds-java-api/64803/1 "2023-11-02T18:04:36Z")

</div>

Hello everyone,  
i am new to graph databases. Recently i became a bit familiar with the cypher language, i played with a few datasets in order to practice crud operations with neo4j. I would like to create a java project that predicts links between nodes (i'm gonna pick a small dataset at first). I have read [FastRP and kNN example](https://neo4j.com/docs/graph-data-science/current/end-to-end-examples/fastrp-knn-example/) which is quite simple. My question is, is there any way that i can use these algorithms from a java library? I was searching around for tutorial articles or youtube videos but didn't find anything useful. I also checked for [Maven Repositories](https://mvnrepository.com/search?q=neo4j+graph+data+science), found a lot of them, but there is no documentation of how to use them.  
I am using neo4j community version 5.13.0 combined with neo4j-graph-data-science-2.5.2.  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![glilienfield](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/glilienfield/32/27534_2.png) [@glilienfield](https://community.neo4j.com/u/glilienfield)\
**Post date:** [November 2, 2023, 7:53pm UTC](https://community.neo4j.com/t/neo4j-gds-java-api/64803/2 "2023-11-02T19:53:44Z")

</div>

I think your option is to use the java driver.

---

<div class="post-metadata">

**Author:** ![xar.zax](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/xar.zax/32/32533_2.png) [@xar.zax](https://community.neo4j.com/u/xar.zax)\
**Post date:** [November 2, 2023, 8:40pm UTC](https://community.neo4j.com/t/neo4j-gds-java-api/64803/3 "2023-11-02T20:40:53Z")

</div>

Well right now this was my way to go, connect to a neo4j driver that has GDS plugin installed and execute queries like:

```auto
CALL gds.graph.project(
  'purchases',
  ['Person','Product'],
  {
    BUYS: {
      orientation: 'UNDIRECTED',
      properties: 'amount'
    }
  }
)

```

```auto
CALL gds.fastRP.mutate('purchases',
  {
    embeddingDimension: 4,
    randomSeed: 42,
    mutateProperty: 'embedding',
    relationshipWeightProperty: 'amount',
    iterationWeights: [0.8, 1, 1, 1]
  }
)
YIELD nodePropertiesWritten

```

(code quotes are from [FastRP and kNN example](https://neo4j.com/docs/graph-data-science/current/end-to-end-examples/fastrp-knn-example/)). I was looking for a high level java way. I can see that there is a [Python Client](https://neo4j.com/docs/graph-data-science/current/python-client/), maybe there is a similar library in java?

---

<div class="post-metadata">

**Author:** ![glilienfield](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/glilienfield/32/27534_2.png) [@glilienfield](https://community.neo4j.com/u/glilienfield)\
**Post date:** [November 2, 2023, 10:20pm UTC](https://community.neo4j.com/t/neo4j-gds-java-api/64803/4 "2023-11-02T22:20:54Z")

</div>

Yes, neo4j added that GDS support to only the python driver. Probably because they think data scientists use python.
