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

Deal with sink nodes somehow #1

Open
alexpghayes opened this issue Nov 7, 2019 · 6 comments
Open

Deal with sink nodes somehow #1

alexpghayes opened this issue Nov 7, 2019 · 6 comments

Comments

@alexpghayes
Copy link
Collaborator

Options:

  • Do something about them
  • Ignore them silently
  • Ignore them with a warning

Important to document this because otherwise the, for example, igraph PPR and the aPPR PPR numbers don't match up. Also results in weird circumstances where you visit all nodes in a graph (consider a -> b -> c as an entire graph), but sum(p) << 1. This seems somewhat concerning to me.

@fchen365 fchen365 closed this as completed Nov 7, 2019
@fchen365 fchen365 reopened this Nov 7, 2019
@fchen365
Copy link
Collaborator

fchen365 commented Nov 7, 2019

This is what I did in the old time (also the current heck for targeted sampling), when a sink node is found:
(i) delete such node.
(ii) return r and p value to the seed. This way, sum(p) and sum(r) remain legit.
(iii) send out a warning.

@alexpghayes
Copy link
Collaborator Author

Would you be willing to write up the version of Algorithm 3 with these changes? I'm not quite following from the verbal description, and it would be good to include the "modified" version in a vignette as part of the package documentation anyway. i.e. adding something likes to the follow that describe what happens when the for loop is empty

image

@fchen365
Copy link
Collaborator

fchen365 commented Nov 8, 2019

This makes sense. I will try to do this next week.

@alexpghayes
Copy link
Collaborator Author

Hmmm is there something better than deleting sink nodes? If you have a graph a -> b -> c -> d -> e this will eventually result in deleting the whole graph.

@alexpghayes
Copy link
Collaborator Author

Also does it make more sense to return p and r to the seed, or to the currently visited node u?

@fchen365
Copy link
Collaborator

Hmmm is there something better than deleting sink nodes? If you have a graph a -> b -> c -> d -> e this will eventually result in deleting the whole graph.

open to suggestion. although these nodes are often less of our interest after all.

Also does it make more sense to return p and r to the seed, or to the currently visited node u?

The seed. We know we want to delete the node only when we actually select and query the node. So, currently, u is the sink one.

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