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

Generate all walks of depth x #99

Open
moritzblum opened this issue Mar 23, 2022 · 2 comments
Open

Generate all walks of depth x #99

moritzblum opened this issue Mar 23, 2022 · 2 comments
Labels
question Further information is requested

Comments

@moritzblum
Copy link

Hi,
is there a parameter to sample all walks of a certain depth, e.g., as done in the original RDF2vec paper for DBpedia and Wikidata with depth 2 following direct outgoing relations? I think numberOfWalks is not able to specify this setting.

@janothan
Copy link
Member

Hi, this feature is currently not implemented.
From earlier experience: This easily gets very expensive on larger graphs.

To approximate this, you theoretically could set numberOfWalks to a very high number and combine this with a DUPLICATE_FREE walkGenerationMode -- however, this also scales very badly.

The correct way would be to extend the framework for this capability. jRDF2vec is extensible enough to add walk generation flavors. The process is roughly documented here -- albeit very incompletely. Adding the feature you described is not on the near-term roadmap. However, feel free to fork and extend this repo and to eventually create a pull request.

One last remark: Note that the semantics of depth vary in publications. Sometimes depth refers to one "triple hop" (i.e., S-P-O has depth=1) as in this framework; sometimes it refers to the number of element hops (i.e., S-P-O has depth=2).

@janothan janothan added the question Further information is requested label Mar 23, 2022
@moritzblum
Copy link
Author

Thanks for the quick reply. I assume the depth in the original RDF2vec refers to "element hop" and, e.g., in your RDF2vec Lite refers to "triple hop"? That has actually always confused me a bit and was not clear to me, thanks for the hint.

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

No branches or pull requests

2 participants