Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a method for generating ontology embeddings to makefile #6

Open
matentzn opened this issue Jul 14, 2023 · 1 comment
Open

Add a method for generating ontology embeddings to makefile #6

matentzn opened this issue Jul 14, 2023 · 1 comment
Assignees

Comments

@matentzn
Copy link
Member

From @caufieldjh:

To get graph embeddings (note this is just with grape - NEAT may be used to automate the process, but this is what runs):
Install grape: pip install grape

from grape.datasets.kghub import KGPhenio
from grape.embedders import FirstOrderLINEEnsmallen
graph = KGPhenio()
embedding = FirstOrderLINEEnsmallen().fit_transform(graph)

By default, embedding will be a pandas df, or if you run `.fit_transform(graph, return_dataframe=False) then it will be a numpy array.
So the final step is to save accordingly, e.g. with embedding.to_csv('embedding.tsv', sep="\t")

@matentzn
Copy link
Member Author

@souzadevinicius This is of moderate but relatively high priority, because I expect hiccups :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants