Skip to content

What kind of dataset can use the louvain of graphscope? #379

Answered by acezen
neblen asked this question in Q&A
Discussion options

You must be logged in to vote

the louvain algorithm now only support undirected graph, you can use louvain like:

g = sess.g(directed=False)
g = g.add_vertices("/tmp/testingdata/property/p2p-31_property_v_0", label="person")
g = g.add_edges("/tmp/testingdata/property/p2p-31_property_e_0", label="knows")
simple_graph = g.project(vertices={"person": []}, edges={"knows": ["dist"]})
from graphscope import louvain
result_context=louvain(simple_graph)

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@neblen
Comment options

Answer selected by neblen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #378 on June 07, 2021 06:17.