AnacletoLAB / grape

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

setting node ontologies #41

Open johneisai opened 1 year ago

johneisai commented 1 year ago

Hi,

I see references to node ontologies and predicted node ontologies in the code, and as a result of GraphVisualizer.fit_and_plot_all. Is there a way to set ontological categories or other node attributes after reading in a graph so they'd show up when plot_node_ontologies is called, or something similar? If these are predicted, how is that done?

Thanks! Hope it's not too obvious a question to answer.

LucaCappelletti94 commented 1 year ago

Hi! They are obtained from an extensive set of heuristics I wrote based primarily on the curie prefixes. They have primarily two goals:

  1. Making it possible to provide URLs in the graph report that link to the source of the nodes.
  2. Showing in the graph visualization whether the separation observed in eventual node types is just a proxy of the topological separation of the ontologies. If the node types are well separated solely because the ontologies are well separated, likely you don't have the KG you would hope for.

The ontologies are derived from the curie node names. If you want the ontologies to be shown in the visualizations/report, standardize your node names using the curie name of the source ontologies.

johneisai commented 1 year ago

Hi,

Thanks so much for the code! This is awesome, I'll format accordingly.

Thanks again for the friendly and timely response.

Cheers,

John

Get Outlook for iOShttps://aka.ms/o0ukef


From: Luca Cappelletti @.> Sent: Wednesday, June 14, 2023 4:18:03 AM To: AnacletoLAB/grape @.> Cc: John Williams @.>; Author @.> Subject: [EXTERNAL] Re: [AnacletoLAB/grape] setting node ontologies (Issue #41)

Security First: External email, use caution clicking links or opening attachments.

Hi! They are obtained from an extensive set of heuristics I wrotehttps://github.com/AnacletoLAB/ensmallen/tree/master/graph/src/url_utilities based primarily on the curie prefixes. They have primarily two goals:

  1. Making it possible to provide URLs in the graph report that link to the source of the nodes.
  2. Showing in the graph visualization whether the separation observed in eventual node types is just a proxy of the topological separation of the ontologies. If the node types are well separated solely because the ontologies are well separated, likely you don't have the KG you would hope for.

The ontologies are derived from the curie node names. If you want the ontologies to be shown in the visualizations/report, standardize your node names using the curie name of the source ontologies.

— Reply to this email directly, view it on GitHubhttps://github.com/AnacletoLAB/grape/issues/41#issuecomment-1590704907, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AZG2ITNND4FZOUAMRONPNDLXLFXTXANCNFSM6AAAAAAZFLO52Y. You are receiving this because you authored the thread.Message ID: @.***>

[This e-mail message may contain privileged, confidential and/or proprietary information of Eisai. If you believe that it has been sent to you in error, please contact the sender immediately and delete the message including any attachments, without copying, using, or distributing any of the information contained therein. This e-mail message should not be interpreted to include a digital or electronic signature that can be used to authenticate an agreement, contract or other legal document, nor to reflect an intention to be bound to any legally-binding agreement or contract.]