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

RIS function list index out of range #1

Open
mbjallow6 opened this issue May 25, 2021 · 2 comments
Open

RIS function list index out of range #1

mbjallow6 opened this issue May 25, 2021 · 2 comments

Comments

@mbjallow6
Copy link

I have tried your RIS implementation several times but when ever I used a very low mc value let say less than 50, I often have a list index out of range error. How does the flat list becomes empty?
error

@mbjallow6 mbjallow6 reopened this May 26, 2021
@mbjallow6
Copy link
Author

Just to add so findings about the above issue. After a series of testing i found that the higher the probability value the more like to "R" as in the code run out of index.

@hautahi
Copy link
Owner

hautahi commented Jun 12, 2021

Thanks for your comment - sorry for slow response.

You're right, there are a number of parameter settings that could lead to an index error resulting from an emptyflat_list list.

  • mc determines the original size of the flat list, so yes, a low value of mc increases the possibility that the k seed nodes will "cover" all the RRS's.
  • A large p value increases the size of the RRS's so that any given node generally appears in more of them.
  • A large k will also create a similar situation as the size of the flat_list decreases with each iteration.

This issue can be fixed using a simple if flat_list: statement on line 54.

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