【Neo4j】GDS演算法
Graph Data Science Library
跨部門的合作,加薪升職的機率會高於其他人~
五階段-圖數據的演變
- 知識圖譜
- 圖分析
- 圖特徵工程
- 圖遷入
- 圖類神經網路
Knowledge Graphs
客戶的交易、黑名單、非監督學習
多個人共享手機/地址/身分證字號,使用Cypher即可查找
圖算法
- Pathfinding & Search
- Centrality & Importance
- Community Detection
- Heuristic Link Prediction
- Similarity
- Node Embeddings & ML
多個圖算法進行分析
圖特徵工程
二維向量-embeddings
查詢 - 算法 - embeddings
圖的三種方式
Multipartite 多方圖
Bipartite 二方圖
節點跟邊
實際生活中是多方圖、但是在運行算法的時候,要去做處理 (使用二方圖)
帳戶持有人 交易動作紀錄
先幫各節點打分,在複雜的圖之中去使用
Person-[:APPEARED_IN]->Book
放到投影圖
將數據放置到投影圖
先投影到內存 - 算法 - 回寫到數據庫
不適合圖算法的資料
演算法的使用
不斷更新的演算法
Steam-查詢、Write-寫入、Stats-輸出算法運行的狀態
Estimate-評估 (算法運行前執行)
先放到投影圖(二方圖),每個投影對應的演算法都不同
- 投影 – Native Projection、Cypher Projection
// Native projection CALL gds.graph.create( graphName: String, nodeProjection: String, List or Map, relationshipProjection: String, List or Map, configuration: Map )
// Cypher projection CALL gds.graph.create( graphName: String, nodeQuery: String, relationshipQuery: String, configuration: Map )
推薦命名圖 Named 和 Native性能較好
演算法
https://neo4j.com/docs/graph-data-science/current/
Neo4j 擅長的無監督式學習
PageRank-較成熟的演算法
Degree – Indegree、outdegree
哪些節點之間連接的路徑最短
節點中最大的中心性
Community Detection
社區檢測 - 聯通性
三角形、
Similarity

