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

Seed node2vec random walks from clock instead of current time. #236

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

phoeinx
Copy link

@phoeinx phoeinx commented Oct 11, 2022

Not 100% sure how the contributing guidelines for this repository work, so please forgive me if this is not the exact right way.

This PR would already be superseded by #191 from @maxaalexeeva which would allow passing in a seed as a parameter to node2vec. In the long run, I think @maxaalexeeva s PR would benefit both people needing node2vec to be deterministic and those wanting it to be consistently non-deterministic. This PR introduces a minor change that makes node2vec consistently non-deterministic by using a different seeding number generation, which is already used in other places throughout the project.

Calls to time(NULL) return the current calendar time in seconds since 1 January 1970. Node2vec runs that are started in the same second (e.g. when automated) have the same seed and therefore the same embedding. To enable comparing different embeddings when running automated scripts this commit introduces seeding based on TSysTm::GetPerfTimerTicks(), as e.g. already used in randwalk.cpp.

Calls to time(NULL) return the current calendar time in seconds since 1 January 1970. Node2vec runs which are started in the same second (e.g. when automated) therefore have the same seed and consequently the same embedding. To enable comparing different embeddings which were created automatedely this commit introduces seeding based on TSysTm::GetPerfTimerTicks(), as e.g. already used in randwalk.cpp.
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

Successfully merging this pull request may close these issues.

1 participant