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.

NodeSimilarity Algorithm

hello,

I have created few nodes, labels and relationships based on employee data.
Something like this

Employee data file

LOAD CSV WITH HEADERS FROM "FILE:///Emp_Data.csv" AS row
merge (employee:employee {emp:row.Emp_ID, fullName:row.Full_Name, firstName: row.First_Name, lastName: row.Last_Name, title: row.Title, Address: row.Address, City:row.City, State:row.State, Country:row.Country, ZipCode:row.Zipcode,Department:row.Department, Hire_Date:row.Hire_Date, email:row.Email_Address});

Relationship files

LOAD CSV WITH HEADERS FROM "FILE:///Emp_Details.csv" AS row1
With row1
Match (employee:employee) where employee.emp = row1.Emp_ID
Merge(m:manager{Manager:row1.Manager})
Merge (d:Department{Department: row1.Department})
merge (a:Address{Address:row1.Address})
merge (employee)-[:reports_to]->(m)
merge (employee)-[:in_dept]->(d)
merge (employee)-[:work_address]->(a)

based on the above data, I was trying to find similarities based on relationships described between two employees

Below is the APOC function used:

CALL algo.nodeSimilarity.stream("employee", "")
YIELD node1, node2, similarity
RETURN algo.asNode(node1).fullName as Emp1, algo.asNode(node2).fullName as Emp2, similarity
ORDER BY similarity desc, Emp1, Emp2

it returns
(no changes, no records)

Can someone please point out what's wrong with the code?

0 REPLIES 0