We are trying to run the K-Mean GDS algorithm (CALL gds.kmeans.write/stream) on 'node A' with a property with value type float. However, Neo4j throws an error stating that the property value must be an array.
For our use case, we are dealing with a huge data set with millions of records. It is not possible to alter the property type for the entire data as and when required. Below is a query that I tried:
MATCH (a:A)
WITH toFloatlist(a.property) AS array
CALL gds.kmeans.stream('Graph01', {
nodeProperty: 'array',
k: 3,
randomSeed: 42
})
YIELD nodeId, communityId
RETURN gds.util.asNode(nodeId).name AS name, communityId
ORDER BY communityId DESC