gds(1) 중심성 알고리즘 체험기 - sfjun/neo4j GitHub Wiki

#neo4j설치 neo4j desktop 1.3.4 설치 (최신버전 설치 후 db 생성시 cant change password 에러, 화면이 제대로 디스플레이 안됨)

#gds 설치#수동설치 Neo4j 다운로드 센터, neo4j-graph-data-science-[version].jar 파일, $NEO4J_HOME/plugins디렉토리.

https://neo4j.com/download-center/#algorithms

neo4j db버전, gds 버전, 자바 버전 비교 https://github.com/neo4j/graph-data-science

#neo4j.conf 셋업 dbms.security.procedures.whitelist = gds.* dbms.security.procedures.unrestricted = gds.*

#설치확인 버전업

gds.version() "1.5.1"

RETURN gds.version()

gds.version() "1.4.1"

#설치된 알고리즘 전체 리스트업

CALL gds.list()

Started streaming 202 records after 2 ms and completed after 895 ms.

###################################################

■ PageRank

예)

CREATE (home:Page {name:'Home'}), (about:Page {name:'About'}), (product:Page {name:'Product'}), (links:Page {name:'Links'}), (a:Page {name:'Site A'}), (b:Page {name:'Site B'}), (c:Page {name:'Site C'}), (d:Page {name:'Site D'}),

(home)-[:LINKS {weight: 0.2}]->(about), (home)-[:LINKS {weight: 0.2}]->(links), (home)-[:LINKS {weight: 0.6}]->(product), (about)-[:LINKS {weight: 1.0}]->(home), (product)-[:LINKS {weight: 1.0}]->(home), (a)-[:LINKS {weight: 1.0}]->(home), (b)-[:LINKS {weight: 1.0}]->(home), (c)-[:LINKS {weight: 1.0}]->(home), (d)-[:LINKS {weight: 1.0}]->(home), (links)-[:LINKS {weight: 0.8}]->(home), (links)-[:LINKS {weight: 0.05}]->(a), (links)-[:LINKS {weight: 0.05}]->(b), (links)-[:LINKS {weight: 0.05}]->(c), (links)-[:LINKS {weight: 0.05}]->(d);

Added 8 labels, created 8 nodes, set 22 properties, created 14 relationships, completed after 390 ms.


#다음 문은 네이티브 프로젝션을 사용하여 그래프를 만들고 'myGraph'라는 이름으로 그래프 카탈로그에 저장합니다.

CALL gds.graph.create( 'myGraph', 'Page', 'LINKS', { relationshipProperties: 'weight' } )

nodeProjection relationshipProjection graphName nodeCount relationshipCount createMillis { "Page": { "properties": {

},

"label": "Page" } } { "LINKS": { "orientation": "NATURAL", "aggregation": "DEFAULT", "type": "LINKS", "properties": { "weight": { "property": "weight", "aggregation": "DEFAULT", "defaultValue": null } } } } "myGraph" 8 14 209

Started streaming 1 records after 18 ms and completed after 6091 ms.

#생성확인

CALL gds.graph.list() # 전체조회

degreeDistribution graphName database memoryUsage sizeInBytes nodeProjection relationshipProjection nodeQuery relationshipQuery nodeCount relationshipCount density creationTime modificationTime schema

CALL gds.graph.list('myGraph') 전체중 위의 graphName 만 지정하여 조회시

degreeDistribution graphName database memoryUsage sizeInBytes nodeProjection relationshipProjection nodeQuery relationshipQuery nodeCount relationshipCount density creationTime modificationTime schema

4.1 메모리 추정

CALL gds.pageRank.write.estimate('myGraph', { writeProperty: 'pageRank', maxIterations: 20, dampingFactor: 0.85 }) YIELD nodeCount, relationshipCount, bytesMin, bytesMax, requiredMemory

nodeCount relationshipCount bytesMin bytesMax requiredMemory 8 14 856 856 "856 Bytes"

4.2 흐름

CALL gds.pageRank.stream('myGraph') YIELD nodeId, score RETURN gds.util.asNode(nodeId).name AS name, score ORDER BY score DESC, name ASC

name score "Home" 3.2362018343177623 "About" 1.0611098931171001 "Links" 1.0611098931171001 "Product" 1.0611098931171001 "Site A" 0.3292259060894139 "Site B" 0.3292259060894139 "Site C" 0.3292259060894139 "Site D" 0.3292259060894139

4.3. 통계

CALL gds.pageRank.stats('myGraph', { maxIterations: 20, dampingFactor: 0.85 }) YIELD centralityDistribution RETURN centralityDistribution.max AS max

max 3.236204147338867

4.4. 돌연변이

CALL gds.pageRank.mutate('myGraph', { maxIterations: 20, dampingFactor: 0.85, mutateProperty: 'pagerank' }) YIELD nodePropertiesWritten, ranIterations

nodePropertiesWritten ranIterations 8 20

4.5. 쓰다

CALL gds.pageRank.write('myGraph', { maxIterations: 20, dampingFactor: 0.85, writeProperty: 'pagerank' }) YIELD nodePropertiesWritten, ranIterations

nodePropertiesWritten ranIterations 8 20

4.6. 가중

CALL gds.pageRank.stream('myGraph', { maxIterations: 20, dampingFactor: 0.85, relationshipWeightProperty: 'weight' }) YIELD nodeId, score RETURN gds.util.asNode(nodeId).name AS name, score ORDER BY score DESC, name ASC

name score "Home" 3.5528570797032444 "Product" 1.9541302592027932 "About" 0.7513767506927252 "Links" 0.7513767506927252 "Site A" 0.1816736041444528 "Site B" 0.1816736041444528 "Site C" 0.1816736041444528 "Site D" 0.1816736041444528

4.7. 공차

CALL gds.pageRank.stream('myGraph', { maxIterations: 20, dampingFactor: 0.85, tolerance: 0.1 }) YIELD nodeId, score RETURN gds.util.asNode(nodeId).name AS name, score ORDER BY score DESC, name ASC

name score "Home" 2.8504481718642634 "About" 0.9325181037187577 "Links" 0.9325181037187577 "Product" 0.9325181037187577 "Site A" 0.30351586283650245 "Site B" 0.30351586283650245 "Site C" 0.30351586283650245 "Site D" 0.30351586283650245

4.8. 댐핑팩터

CALL gds.pageRank.stream('myGraph', { maxIterations: 20, dampingFactor: 0.05 }) YIELD nodeId, score RETURN gds.util.asNode(nodeId).name AS name, score ORDER BY score DESC, name ASC

name score "Home" 1.2487309578806898 "About" 0.9708121816863439 "Links" 0.9708121816863439 "Product" 0.9708121816863439 "Site A" 0.9597081215046243 "Site B" 0.9597081215046243 "Site C" 0.9597081215046243 "Site D" 0.9597081215046243

4.9. 개인화된 PageRank

MATCH (siteA:Page {name: 'Site A'}) CALL gds.pageRank.stream('myGraph', { maxIterations: 20, dampingFactor: 0.85, sourceNodes: [siteA] }) YIELD nodeId, score RETURN gds.util.asNode(nodeId).name AS name, score ORDER BY score DESC, name ASC

name score "Home" 0.4015879064354522 "Site A" 0.1690742583792599 "About" 0.11305649114656262 "Links" 0.11305649114656262 "Product" 0.11305649114656262 "Site B" 0.019074258379259846 "Site C" 0.019074258379259846 "Site D" 0.019074258379259846

참조: https://bab2min.tistory.com/554

#세상의 많은 관계들을 수학적으로 나타내는데에는 그래프만큼 강력한 도구도 없습니다. 관계의 주체가 되는 행위자들은 Node로, 관계들은 Node사이를 연결하는 Edge로 나타낼 수 있기 때문이죠. 이렇게 주변에서 찾아볼 수 있는 관계를 수학적인 형태의 Graph로 바꾸면 여러 가지가 가능해지는데, 그 중 대표적인것이 중심성(Centrality) 계산입니다. 중심성은 그래프 상에서 어떤 Node가 가장 중요한지를 살피는 척도인데요,

조회

CALL gds.graph.list()

#삭제

CALL gds.graph.drop('myGraph')

■ ArticleRank

예)

CREATE (paper0:Paper {name:'Paper 0'}), (paper1:Paper {name:'Paper 1'}), (paper2:Paper {name:'Paper 2'}), (paper3:Paper {name:'Paper 3'}), (paper4:Paper {name:'Paper 4'}), (paper5:Paper {name:'Paper 5'}), (paper6:Paper {name:'Paper 6'}),

(paper1)-[:CITES]->(paper0),

(paper2)-[:CITES]->(paper0), (paper2)-[:CITES]->(paper1),

(paper3)-[:CITES]->(paper0), (paper3)-[:CITES]->(paper1), (paper3)-[:CITES]->(paper2),

(paper4)-[:CITES]->(paper0), (paper4)-[:CITES]->(paper1), (paper4)-[:CITES]->(paper2), (paper4)-[:CITES]->(paper3),

(paper5)-[:CITES]->(paper1), (paper5)-[:CITES]->(paper4),

(paper6)-[:CITES]->(paper1), (paper6)-[:CITES]->(paper4);

Added 7 labels, created 7 nodes, set 7 properties, created 14 relationships, completed after 48 ms.

#스트리밍.

CALL gds.alpha.articleRank.stream({ nodeProjection: 'Paper', relationshipProjection: 'CITES', maxIterations: 20, dampingFactor: 0.85 }) YIELD nodeId, score RETURN gds.util.asNode(nodeId).name AS Name, score as ArticleRank ORDER BY score DESC

Name ArticleRank "Paper 0" 0.34627691782989134 "Paper 1" 0.31950149169715586 "Paper 4" 0.21375000253319743 "Paper 2" 0.21092906260164457 "Paper 3" 0.18028125041164458 "Paper 5" 0.15000000000000002 "Paper 6" 0.15000000000000002

CALL gds.alpha.articleRank.write({ nodeProjection: 'Paper', relationshipProjection: 'CITES', maxIterations:20, dampingFactor:0.85, writeProperty: "pagerank" }) YIELD nodes

nodes 0

CALL gds.alpha.articleRank.write(graphNameOrConfig: String | Map, configuration: Map) YIELD nodes, maxIterations, createMillis, computeMillis, writeMillis, dampingFactor, writeProperty, centralityDistribution

Invalid input '|': expected whitespace, comment, NodeLabel, MapLiteral, a parameter, a parameter (old syntax), a relationship pattern, NodeLabelOrRelType, '.', '[', '^', '*', '/', '%', '+', '-', "=", IN, STARTS, ENDS, CONTAINS, IS, '=', '', "<>", "!=", '<', '>', "<=", ">=", AND, XOR, OR, ',' or ')' (line 1, column 60 (offset: 59)) "CALL gds.alpha.articleRank.write(graphNameOrConfig: String | Map, configuration: Map)"

CALL gds.alpha.articleRank.stream(graphNameOrConfig: String|Map, configuration: Map) YIELD node, score

Invalid input '|': expected an identifier character, whitespace, NodeLabel, a property map, a relationship pattern, NodeLabelOrRelType, '.', '[', '^', '*', '/', '%', '+', '-', "=", IN, STARTS, ENDS, CONTAINS, IS, '=', '', "<>", "!=", '<', '>', "<=", ">=", AND, XOR, OR, ',' or ')' (line 1, column 60 (offset: 59)) "CALL gds.alpha.articleRank.stream(graphNameOrConfig: String|Map, configuration: Map)" ^

ArticleRank 알고리즘은 다음 그래프 유형을 지원합니다. 감독, 비가중, 무방향, 무가 중

■ 사이의 중심성Betweenness Centrality

예)

CREATE (alice:User {name: 'Alice'}), (bob:User {name: 'Bob'}), (carol:User {name: 'Carol'}), (dan:User {name: 'Dan'}), (eve:User {name: 'Eve'}), (frank:User {name: 'Frank'}), (gale:User {name: 'Gale'}),

(alice)-[:FOLLOWS]->(carol), (bob)-[:FOLLOWS]->(carol), (carol)-[:FOLLOWS]->(dan), (carol)-[:FOLLOWS]->(eve), (dan)-[:FOLLOWS]->(frank), (eve)-[:FOLLOWS]->(frank), (frank)-[:FOLLOWS]->(gale);

Added 7 labels, created 7 nodes, set 7 properties, created 7 relationships, completed after 27 ms.

네이티브 그래프 카탈로그 생성

CALL gds.graph.create('myGraph', 'User', 'FOLLOWS')

nodeProjection relationshipProjection graphName nodeCount relationshipCount createMillis { "User": { "properties": {

},

"label": "User" } } { "FOLLOWS": { "orientation": "NATURAL", "aggregation": "DEFAULT", "type": "FOLLOWS", "properties": {

}

} } "myGraph" 7 7 40

4.1. 메모리 추정

CALL gds.betweenness.write.estimate('myGraph', { writeProperty: 'betweenness' }) YIELD nodeCount, relationshipCount, bytesMin, bytesMax, requiredMemory

nodeCount relationshipCount bytesMin bytesMax requiredMemory 7 7 2912 2912 "2912 Bytes"

확인

CALL gds.graph.list()

4.2. 흐름

CALL gds.betweenness.stream('myGraph') YIELD nodeId, score RETURN gds.util.asNode(nodeId).name AS name, score ORDER BY name ASC

name score "Alice" 0.0 "Bob" 0.0 "Carol" 8.0 "Dan" 3.0 "Eve" 3.0 "Frank" 5.0 "Gale" 0.0

4.3. 통계

CALL gds.betweenness.stats('myGraph') YIELD centralityDistribution RETURN centralityDistribution.min AS minimumScore, centralityDistribution.mean AS meanScore

Unknown procedure output: centralityDistribution (line 2, column 7 (offset: 44)) "YIELD centralityDistribution" ^

4.4. 돌연변이

-->에러로 불가

Closeness Centrality

예제)

CREATE (a:Node{id:"A"}), (b:Node{id:"B"}), (c:Node{id:"C"}), (d:Node{id:"D"}), (e:Node{id:"E"}), (a)-[:LINK]->(b), (b)-[:LINK]->(a), (b)-[:LINK]->(c), (c)-[:LINK]->(b), (c)-[:LINK]->(d), (d)-[:LINK]->(c), (d)-[:LINK]->(e), (e)-[:LINK]->(d);

Added 5 labels, created 5 nodes, set 5 properties, created 8 relationships, completed after 33 ms.

stream

CALL gds.alpha.closeness.stream({ nodeProjection: 'Node', relationshipProjection: 'LINK' }) YIELD nodeId, centrality RETURN gds.util.asNode(nodeId).name AS user, centrality ORDER BY centrality DESC

user centrality null 0.6666666666666666 null 0.5714285714285714 null 0.5714285714285714 null 0.4 null 0.4

-->user가 제대로 나오지 않아(.name이 없음) 수정

CALL gds.alpha.closeness.stream({ nodeProjection: 'Node', relationshipProjection: 'LINK' }) YIELD nodeId, centrality RETURN gds.util.asNode(nodeId).id AS user, centrality ORDER BY centrality DESC

user centrality "C" 0.6666666666666666 "B" 0.5714285714285714 "D" 0.5714285714285714 "E" 0.4 "A" 0.4

쓰다

CALL gds.alpha.closeness.write({ nodeProjection: 'Node', relationshipProjection: 'LINK', writeProperty: 'centrality' }) YIELD nodes, writeProperty

nodes writeProperty 5 "centrality"

  1. 사이퍼 투영

CALL gds.alpha.closeness.write({ nodeQuery: 'MATCH (p:Node) RETURN id(p) AS id', relationshipQuery: 'MATCH (p1:Node)-[:LINK]->(p2:Node) RETURN id(p1) AS source, id(p2) AS target' }) YIELD nodes, writeProperty

nodes writeProperty 5 "centrality"

Harmonic Centrality 알고리즘

예제)

CREATE (a:Node{id:"A"}), (b:Node{id:"B"}), (c:Node{id:"C"}), (d:Node{id:"D"}), (e:Node{id:"E"}), (a)-[:LINK]->(b), (b)-[:LINK]->(c), (d)-[:LINK]->(e)

Added 5 labels, created 5 nodes, set 5 properties, created 3 relationships, completed after 25 ms.

name 대신 id로 수정하여 CALL gds.alpha.closeness.harmonic.stream({ nodeProjection: 'Node', relationshipProjection: 'LINK' }) YIELD nodeId, centrality RETURN gds.util.asNode(nodeId).id AS user, centrality ORDER BY centrality DESC

user centrality "B" 0.5 "A" 0.375 "C" 0.375 "D" 0.25 "E" 0.25

CALL gds.alpha.closeness.harmonic.write({ nodeProjection: 'Node', relationshipProjection: 'LINK', writeProperty: 'centrality' }) YIELD nodes, writeProperty

nodes writeProperty 5 "centrality"

Degree Centrality

예)

CREATE (alice:User {name: 'Alice'}), (bridget:User {name: 'Bridget'}), (charles:User {name: 'Charles'}), (doug:User {name: 'Doug'}), (mark:User {name: 'Mark'}), (michael:User {name: 'Michael'}), (alice)-[:FOLLOWS]->(doug), (alice)-[:FOLLOWS]->(bridget), (alice)-[:FOLLOWS]->(charles), (mark)-[:FOLLOWS]->(doug), (mark)-[:FOLLOWS]->(michael), (bridget)-[:FOLLOWS]->(doug), (charles)-[:FOLLOWS]->(doug), (michael)-[:FOLLOWS]->(doug)

Added 6 labels, created 6 nodes, set 6 properties, created 8 relationships, completed after 15 ms.

#가장 많은 팔로워를 보유한 사용자를 보여줍니다.

CALL gds.alpha.degree.stream({ nodeProjection: 'User', relationshipProjection: { FOLLOWS: { type: 'FOLLOWS', orientation: 'REVERSE' } } }) YIELD nodeId, score RETURN gds.util.asNode(nodeId).name AS name, score AS followers ORDER BY followers DESC

name followers "Doug" 5.0 "Bridget" 1.0 "Michael" 1.0 "Charles" 1.0 "Mark" 0.0 "Alice" 0.0

#가장 많은 다른 사용자를 팔로우하는 사용자를 보여줍니다.

CALL gds.alpha.degree.stream({ nodeProjection: 'User', relationshipProjection: 'FOLLOWS' }) YIELD nodeId, score RETURN gds.util.asNode(nodeId).name AS name, score AS followers ORDER BY followers DESC

name followers "Alice" 3.0 "Mark" 2.0 "Bridget" 1.0 "Michael" 1.0 "Charles" 1.0 "Doug" 0.0

CALL gds.alpha.degree.write({ nodeProjection: 'User', relationshipProjection: 'FOLLOWS', writeProperty: 'followers' })

nodes createMillis computeMillis writeMillis writeProperty 6 9 0 8 "followers"

-->코드가 섞인듯 이상하네

  1. 가중치 중심 알고리즘 샘플 ================================================= 예)

CREATE (alice:User {name:'Alice'}), (bridget:User {name:'Bridget'}), (charles:User {name:'Charles'}), (doug:User {name:'Doug'}), (mark:User {name:'Mark'}), (michael:User {name:'Michael'}), (alice)-[:FOLLOWS {score: 1}]->(doug), (alice)-[:FOLLOWS {score: 2}]->(bridget), (alice)-[:FOLLOWS {score: 5}]->(charles), (mark)-[:FOLLOWS {score: 1.5}]->(doug), (mark)-[:FOLLOWS {score: 4.5}]->(michael), (bridget)-[:FOLLOWS {score: 1.5}]->(doug), (charles)-[:FOLLOWS {score: 2}]->(doug), (michael)-[:FOLLOWS {score: 1.5}]->(doug)

Added 6 labels, created 6 nodes, set 14 properties, created 8 relationships, completed after 23 ms.

#가장 가중치가 높은 팔로워를 가진 사용자를 보여줍니다.

CALL gds.alpha.degree.stream({ nodeProjection: 'User', relationshipProjection: { FOLLOWS: { type: 'FOLLOWS', orientation: 'REVERSE', properties: 'score' } }, relationshipWeightProperty: 'score' }) YIELD nodeId, score RETURN gds.util.asNode(nodeId).name AS name, score AS weightedFollowers ORDER BY weightedFollowers DESC

name weightedFollowers "Doug" 7.5 "Charles" 5.0 "Michael" 4.5 "Bridget" 2.0 "Mark" 0.0 "Alice" 0.0

  1. 사이퍼 투영

CALL gds.alpha.degree.write({ nodeQuery: 'MATCH (u:User) RETURN id(u) AS id', relationshipQuery: 'MATCH (u1:User)-[:FOLLOWS]->(u2:User) RETURN id(u1) AS source, id(u2) AS target', writeProperty: 'followers' })

nodes createMillis computeMillis writeMillis writeProperty 6 20 0 4 "followers"

Eigenvector Centrality

예)

CREATE (home:Page {name:'Home'}), (about:Page {name:'About'}), (product:Page {name:'Product'}), (links:Page {name:'Links'}), (a:Page {name:'Site A'}), (b:Page {name:'Site B'}), (c:Page {name:'Site C'}), (d:Page {name:'Site D'}), (home)-[:LINKS]->(about), (about)-[:LINKS]->(home), (product)-[:LINKS]->(home), (home)-[:LINKS]->(product), (links)-[:LINKS]->(home), (home)-[:LINKS]->(links), (links)-[:LINKS]->(a), (a)-[:LINKS]->(home), (links)-[:LINKS]->(b), (b)-[:LINKS]->(home), (links)-[:LINKS]->(c), (c)-[:LINKS]->(home), (links)-[:LINKS]->(d), (d)-[:LINKS]->(home)

Added 8 labels, created 8 nodes, set 8 properties, created 14 relationships, completed after 22 ms.

CALL gds.alpha.eigenvector.stream({ nodeProjection: 'Page', relationshipProjection: 'LINKS' }) YIELD nodeId, score RETURN gds.util.asNode(nodeId).name AS page, score ORDER BY score DESC

page score "Home" 31.45866386592388 "Product" 14.403928101062775 "Links" 14.403928101062775 "About" 14.403928101062775 "Site A" 6.572431683540344 "Site B" 6.572431683540344 "Site C" 6.572431683540344 "Site D" 6.572431683540344

CALL gds.alpha.eigenvector.write({ nodeProjection: 'Page', relationshipProjection: 'LINKS', writeProperty: 'eigenvector' }) YIELD nodes, iterations, dampingFactor, writeProperty

nodes iterations dampingFactor writeProperty 0 20 1.0 "eigenvector"

#정규화

CALL gds.alpha.eigenvector.stream({ nodeProjection: 'Page', relationshipProjection: 'LINKS', normalization: 'max' }) YIELD nodeId, score RETURN gds.util.asNode(nodeId).name AS page, scorepage score ORDER BY score DESC

"Home" 1.0 "Product" 0.4578684003380434 "Links" 0.4578684003380434 "About" 0.4578684003380434 "Site A" 0.20892278551790694 "Site B" 0.20892278551790694 "Site C" 0.20892278551790694 "Site D" 0.20892278551790694

  1. 사이퍼 투영

CALL gds.alpha.eigenvector.write({ nodeQuery: 'MATCH (p:Page) RETURN id(p) AS id', relationshipQuery: 'MATCH (p1:Page)-[:LINKS]->(p2:Page) RETURN id(p1) AS source, id(p2) AS target', maxIterations: 5 }) YIELD nodes, iterations, dampingFactor, writeProperty

HITS (Hyperlink-Induced Topic Search)

예)

CREATE (a:Website {name: 'A'}), (b:Website {name: 'B'}), (c:Website {name: 'C'}), (d:Website {name: 'D'}), (e:Website {name: 'E'}), (f:Website {name: 'F'}), (g:Website {name: 'G'}), (h:Website {name: 'H'}), (i:Website {name: 'I'}),

(a)-[:LINK]->(b), (a)-[:LINK]->(c), (a)-[:LINK]->(d), (b)-[:LINK]->(c), (b)-[:LINK]->(d), (c)-[:LINK]->(d),

(e)-[:LINK]->(b), (e)-[:LINK]->(d), (e)-[:LINK]->(f), (e)-[:LINK]->(h),

(f)-[:LINK]->(g), (f)-[:LINK]->(i), (f)-[:LINK]->(h), (g)-[:LINK]->(h), (g)-[:LINK]->(i), (h)-[:LINK]->(i);

Added 9 labels, created 9 nodes, set 9 properties, created 16 relationships, completed after 30 ms.

기존 그래프 카테고리에 그래프 삭제 CALL gds.graph.drop("myGraph")

카테고리 등록

CALL gds.graph.create( 'myGraph', 'Website', 'LINK' );

nodeProjection	relationshipProjection	graphName	nodeCount	relationshipCount	createMillis

{ "Website": { "properties": {

},

"label": "Website" } } { "LINK": { "orientation": "NATURAL", "aggregation": "DEFAULT", "type": "LINK", "properties": {

}

} } "myGraph" 9 16 11

CALL gds.alpha.hits.stream('myGraph', {hitsIterations: 20}) YIELD nodeId, values RETURN gds.util.asNode(nodeId).name AS Name, values.auth AS auth, values.hub as hub ORDER BY Name ASC

There is no procedure with the name gds.alpha.hits.stream registered for this database instance. Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed.

gds 버전업

gds.version() "1.5.1"

-->1.4.1에서 alpha.hit가 없음.

#neo4 gds 버전업으로 카테코리 등록부터 다시 해야됨

CALL gds.alpha.hits.stream('myGraph', {hitsIterations: 20}) YIELD nodeId, values RETURN gds.util.asNode(nodeId).name AS Name, values.auth AS auth, values.hub as hub ORDER BY Name ASC

Name auth hub "A" 0.0 0.5147630377521207 "B" 0.42644630743935796 0.3573686670593437 "C" 0.3218729455718005 0.23857061715828276 "D" 0.6463862608483191 0.0 "E" 0.0 0.640681017095129 "F" 0.23646490227616518 0.2763222153580397 "G" 0.10200264424057169 0.23867470447760597 "H" 0.426571816146601 0.0812340105698113 "I" 0.22009646020698218 0.0

⚠️ **GitHub.com Fallback** ⚠️