Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-17-2020 11:06 PM
I'm new to Neo4j and wanted to perform vector/list related operations.
Going through APOC library and documentation.
Things which worked from me but is not scalable:
UNWIND(apoc.coll.zip([1,2,3], [4,5,6])) as output
RETURN COLLECT(apoc.coll.avg(output))
OUTPUT is [2.5, 3.5, 4.5]
The catch is, number of list is dynamic in my case and lenght of each list is expected to be of 300 elements.
Problem to solve is [1, 2, 3], [3, 4, 5], [4, 5, 6], .... [n1, n2, n3]
Output: [(1+3+4+..+n1)/n, (2+4+5+..+n2)/n, (3+5+6+..+n3)/n]
The size of each list is same.
I'm also open for any other library which could achieve the same functionality.
Neo4j Desktop Graph version: 3.5.18
APOC LIbrary: 3.5.0.12
Thanks in advance!
Solved! Go to Solution.
06-21-2020 10:47 PM
06-21-2020 10:47 PM
Solution is available here: https://stackoverflow.com/questions/62450549/compute-avg-of-list-value-for-each-element-in-neo4j/624...
All the sessions of the conference are now available online