Greetings,
I am using the latest GDS (2.6.5) in neo4j desktop (5.15.0). I am not sure how to use Similarity. The code below is data for three different recipes.
Question:
Can I use Similarity to search for recipes similar to Recipe 1 (A->B->C) from various perspectives?
For example, can I search with Similarity based on the presence or absence of process labels?
Each recipe's process has parameters. Is it possible to calculate similarity taking into account the parameter values as well?
Code:
// recipe1
CREATE (fip1:FirstIntermediateProduct {name: "A", created_date: "2023-11-01", projectId: "P1"})
CREATE (sip1:SecondIntermediateProduct {name: "B", created_date: "2023-11-02", projectId: "P1"})
CREATE (fp1:FinalProduct {name: "C", created_date: "2023-11-03", projectId: "P1"})
CREATE (p1:Process {name: "process1", pro1_para1: 100, pro1_para2: 200, pro1_para3: 300, pro1_para4: 400, pro1_para5: 500})
CREATE (p4:Process {name: "process4", pro4_para1: 150, pro4_para2: 250, pro4_para3: 350, pro4_para4: 450, pro4_para5: 550})
CREATE (fip1)-[:mix]->(sip1)-[:add]->(fp1)
CREATE (fip1)-[:process]->(p1)
CREATE (sip1)-[:process]->(p4)
// recipe2
CREATE (fip2:FirstIntermediateProduct {name: "D", created_date: "2023-11-04", projectId: "P2"})
CREATE (sip2:SecondIntermediateProduct {name: "E", created_date: "2023-11-05", projectId: "P2"})
CREATE (fp2:FinalProduct {name: "F", created_date: "2023-11-06", projectId: "P2"})
CREATE (p1_2:Process {name: "process1", pro1_para1: 120, pro1_para2: 220, pro1_para3: 320, pro1_para4: 420, pro1_para5: 520})
CREATE (p2_2:Process {name: "process2", pro2_para1: 180, pro2_para2: 280, pro2_para3: 380, pro2_para4: 480, pro2_para5: 580})
CREATE (p4_2:Process {name: "process4", pro4_para1: 160, pro4_para2: 260, pro4_para3: 360, pro4_para4: 460, pro4_para5: 560})
CREATE (p5_2:Process {name: "process5", pro5_para1: 190, pro5_para2: 290, pro5_para3: 390, pro5_para4: 490, pro5_para5: 590})
CREATE (p6_2:Process {name: "process6", pro6_para1: 140, pro6_para2: 240, pro6_para3: 340, pro6_para4: 440, pro6_para5: 540})
CREATE (fip2)-[:mix]->(sip2)-[:add]->(fp2)
CREATE (fip2)-[:process]->(p1_2)
CREATE (fip2)-[:process]->(p2_2)
CREATE (sip2)-[:process]->(p4_2)
CREATE (sip2)-[:process]->(p5_2)
CREATE (sip2)-[:process]->(p6_2)
// recipe3
CREATE (fip3:FirstIntermediateProduct {name: "G", created_date: "2023-11-07", projectId: "P3"})
CREATE (sip3:SecondIntermediateProduct {name: "H", created_date: "2023-11-08", projectId: "P3"})
CREATE (fp3:FinalProduct {name: "I", created_date: "2023-11-09", projectId: "P3"})
CREATE (p1_3:Process {name: "process1", pro1_para1: 110, pro1_para2: 210, pro1_para3: 310, pro1_para4: 410, pro1_para5: 510})
CREATE (p2_3:Process {name: "process2", pro2_para1: 170, pro2_para2: 270, pro2_para3: 370, pro2_para4: 470, pro2_para5: 570})
CREATE (p3_3:Process {name: "process3", pro3_para1: 130, pro3_para2: 230, pro3_para3: 330, pro3_para4: 430, pro3_para5: 530})
CREATE (p4_3:Process {name: "process4", pro4_para1: 150, pro4_para2: 250, pro4_para3: 350, pro4_para4: 450, pro4_para5: 550})
CREATE (fip3)-[:mix]->(sip3)-[:add]->(fp3)
CREATE (fip3)-[:process]->(p1_3)
CREATE (fip3)-[:process]->(p2_3)
CREATE (fip3)-[:process]->(p3_3)
CREATE (sip3)-[:process]->(p4_3)