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.

Implementing KNN with cosine similarity

Hi/Hello

I am trying to implement a KNN with cosine Similarity, but I found a strange issue that is the following: I checked the official documentation and I implemented some predefined codes to be familiar with KNN in neo4j, the problem was that inside the code, we have a propertynodePropertiesthat the neo4j did not know and arises the following error:

Failed to invoke procedure `gds.beta.knn.write`: Caused by: java.lang.IllegalArgumentException: No value specified for the mandatory configuration parameter `nodeWeightProperty` (a similar parameter exists: [nodeProperties]) 

 Please help me to fix that, because if I want to use KNN with cosine similarity I should use nodeProperties

 nodeProperties: [
        {embedding: "EUCLIDEAN"},
        'age',
        {lotteryNumbers: "OVERLAP"}
    ],

 Thank you in advance

1 REPLY 1

What values were you attempting to pass to knn.write()?

 

Elaine

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online