vesoft-inc / nebula-algorithm

Nebula-Algorithm is a Spark Application based on GraphX, which enables state of art Graph Algorithms to run on top of NebulaGraph and write back results to NebulaGraph.
71 stars 39 forks source link

Whether to support custom edge weights #75

Closed godlovefei closed 9 months ago

godlovefei commented 1 year ago

Does NebulaGraph-Algorithm not support custom edge weights for graph calculations?

There is a column of _rank in the data currently read from nebula-graphx. I want to use _rank as my weight data, but I found that The initialization of pagerank in the org.apache.spark.graphx.lib.PageRank source code does not use this _rank value at all image

image

Should I need to pass the _rank field to customize the weight of the edge?

wey-gu commented 1 year ago

Dear @godlovefei , the _rank refer to the NebulaGraph rank for edge, not a normal property named rank.

@Nicole00 is there any way to leverage weight other than the _rank of the edge for now?

godlovefei commented 1 year ago

Dear @godlovefei , the _rank refer to the NebulaGraph rank for edge, not a normal property named rank.

@Nicole00 is there any way to leverage weight other than the _rank of the edge for now?

No other way has been found yet, because the weight of the edge is initialized in org.apache.spark.graphx.lib.PageRank, but I saw that _rank can be used as an edge in the nebula-algorithm algorithm package weights are used. However, as far as the current situation is concerned, this approach does not seem to work. image

Nicole00 commented 9 months ago

The Algorithm supports weight for edge, but for Pagerank algo, the weight is uselss.