Neo4j Graph Database Fundamentals · บทเรียน

อัลกอริทึมความคล้ายคลึงและการคาดการณ์ลิงก์

สำรวจอัลกอริทึมความคล้ายคลึงของโหนดและการคาดการณ์ลิงก์ที่เผยให้เห็นโครงสร้างซ่อนเร้นและการเชื่อมต่อที่อาจเกิดขึ้นในอนาคตของกราฟ

บทเรียน 4 จาก 413 ขั้นตอน

อัลกอริทึมความคล้ายคลึงและการคาดการณ์ลิงก์ เป็นบทเรียน Neo4j Graph Database Fundamentals ฟรีบน CoddyKit นี่คือบทเรียนที่ 4 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน Neo4j Graph Database Fundamentals และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส Neo4j Graph Database Fundamentals มีบทเรียนทั้งหมด 4 บทเรียน

บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ

Beyond Paths and Centrality

You have seen pathfinding, centrality, and community detection. Another family answers: how alike are two nodes and which connections are likely to form next?

What Is Node Similarity

Similarity algorithms score how comparable two nodes are based on the neighbors or items they share.

Two users who bought many of the same products are similar.

Jaccard Similarity

The Jaccard coefficient divides the size of the shared neighbor set by the size of the combined set. It ranges from 0 to 1.

// Jaccard = |A intersect B| / |A union B|
// 3 shared neighbors, 7 total distinct -> 0.43

Running Node Similarity in GDS

The Graph Data Science library provides a node similarity procedure that compares nodes by shared relationships.

CALL gds.nodeSimilarity.stream('myGraph')
YIELD node1, node2, similarity
RETURN gds.util.asNode(node1).name AS a,
       gds.util.asNode(node2).name AS b,
       similarity
ORDER BY similarity DESC;

Cosine and Overlap Similarity

Other measures include cosine similarity (for weighted vectors) and overlap similarity. Choose based on whether weights matter.

What Is Link Prediction

Link prediction estimates how likely two currently unconnected nodes are to connect in the future, based on graph structure.

It powers friend suggestions and product recommendations.

Common Neighbors

The simplest predictor: the more common neighbors two nodes share, the more likely they connect. Many social suggestions use this idea.

MATCH (a:Person {name: 'Alice'})-[:FRIEND]->(common)<-[:FRIEND]-(b:Person)
WHERE NOT (a)-[:FRIEND]->(b) AND a <> b
RETURN b.name, count(common) AS sharedFriends
ORDER BY sharedFriends DESC;

Adamic-Adar

Adamic-Adar refines common neighbors by giving less weight to highly-connected shared neighbors, since a hub connection is less informative.

RETURN gds.alpha.linkprediction.adamicAdar(node1, node2) AS score;

Preferential Attachment

Preferential attachment assumes nodes with many connections are more likely to gain more. It multiplies the degrees of the two nodes.

RETURN gds.alpha.linkprediction.preferentialAttachment(node1, node2) AS score;

Choosing the Right Measure

No single measure is best. Test several against known outcomes and pick the one that predicts your real links most accurately.

Putting It to Use

Similarity and link prediction feed recommendation systems, deduplication, and network growth analysis. They turn structure into actionable suggestions.

Quick Check

Test your understanding of these algorithms.

Recap

You explored similarity and link prediction:

  • Jaccard, cosine, and overlap measure node similarity
  • Link prediction estimates future connections
  • Common neighbors, Adamic-Adar, and preferential attachment are key predictors
  • Test measures against real outcomes
เริ่มต้นได้ฟรี

เรียนรู้ Neo4j Graph Database Fundamentals ด้วย AI tutor — ฟรี

เขียนและเรียกใช้โค้ดจริงในเบราว์เซอร์ของคุณ รับความช่วยเหลือทันทีจาก AI tutor 24/7 และเรียนรู้ต่อจากที่คุณหยุดบนเว็บหรือในแอป

คอร์ส
12
บทเรียน
48

คำถามที่พบบ่อย

บทเรียน “อัลกอริทึมความคล้ายคลึงและการคาดการณ์ลิงก์” ฟรีหรือไม่

ใช่ — ข้อความเต็มของ “อัลกอริทึมความคล้ายคลึงและการคาดการณ์ลิงก์” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส Neo4j Graph Database Fundamentals ให้อัปเกรดเป็น CoddyKit PRO คอร์ส Neo4j Graph Database Fundamentals มีบทเรียนทั้งหมด 4 บทเรียน

คุณจะเรียนรู้อะไรในบทเรียน “อัลกอริทึมความคล้ายคลึงและการคาดการณ์ลิงก์”

สำรวจอัลกอริทึมความคล้ายคลึงของโหนดและการคาดการณ์ลิงก์ที่เผยให้เห็นโครงสร้างซ่อนเร้นและการเชื่อมต่อที่อาจเกิดขึ้นในอนาคตของกราฟ คุณปฏิบัติ Neo4j Graph Database Fundamentals ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน

คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน Neo4j Graph Database Fundamentals หรือไม่

ไม่จำเป็นต้องมีประสบการณ์มาก่อน Neo4j Graph Database Fundamentals บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 4 จากทั้งหมด 4 บทเรียน

บทเรียน “อัลกอริทึมความคล้ายคลึงและการคาดการณ์ลิงก์” ใช้เวลานานแค่ไหน

บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย

ฉันเขียนและรันโค้ดในบทเรียน Neo4j Graph Database Fundamentals นี้ได้ไหม

ได้ บทเรียน Neo4j Graph Database Fundamentals ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ

บทเรียนทั้งหมดในหลักสูตรนี้

  1. อัลกอริทึมค้นหาเส้นทาง (BFS, DFS)
  2. อัลกอริทึมวัดความเป็นศูนย์กลาง (PageRank)
  3. อัลกอริทึมตรวจจับชุมชน
  4. อัลกอริทึมความคล้ายคลึงและการคาดการณ์ลิงก์
← กลับไปที่ Neo4j Graph Database Fundamentals