AnacletoLAB / grape

🍇 GRAPE is a Rust/Python Graph Representation Learning library for Predictions and Evaluations
MIT License
502 stars 38 forks source link

Question about can_use_edge_weights() #58

Open Rsugihara01 opened 5 months ago

Rsugihara01 commented 5 months ago

Hey, I am using grape to evaluate some embedding methods on my graphs I made with Graph.from_pd(). My graphs are directed graph with weighted edges.

When I looked help(Node2VecCBOWEnsmallen), it says

 |  can_use_edge_weights() -> bool from builtins.type
 |      Returns whether the model can optionally use edge weights.

I'm sorry if I've missed any reading, but I couldn't find any arguments to state whether to use edge weights.

Does it mean when embedder.can_use_edge_weights() returns True and the graph has edge weights, any embedder just uses edge weights automatically? and if i want to change the graph to unweighted edges, I need to remake graph using Graph.from_pd() and delete argument edge_weight_column to make graph unweighted edge?

LucaCappelletti94 commented 5 months ago

Yes, if you load the edge weights in the graph the algorithms will use the edge weights.

Rsugihara01 commented 5 months ago

Thanks for your quick reply! I just want to be sure about it, please feel free to close this issue. Thank you!