-
Notifications
You must be signed in to change notification settings - Fork 168
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
Potential bug in LargeVis::search_reverse_thread #9
Comments
Just curiosity...Did you run any test using this change? |
Hi, I also had to make this change, otherwise it was crashing. I ran it on the CondMat example and it produced acceptable results. |
I have to mention that before fixing this bug, I had to correct the sample_an_edge method to something like this:
Without this correction, I had "index out of range" when rand_value1 would be 1 or when rand_value2 would be one. This is a quick fix, though, but worked. (Potentially another issue) |
That last change shouldn't be necessary because according to GSL's documentation you shouldn't get a 1 running gsl_rng_uniform.
Which dataset were you using when crashed? I removed the GSL dependency in my code. I'm using the stl uniform_real_distribution to improve portability. I did tests with this change and I got acceptable results as well. Next, I did a test using MNIST dataset with the change proposed here, and I get different results (I got more clusters (13) than the typical ten you can find around). So, I think it deserves more debugging. |
I used the CondMath_network dataset. I agree that this deserves more debugging or a separate issue. |
I guess the bug is in the construction of |
After doing some research, it looks like there is a rounding problem between double and float (real). The details are explained here. I changed the sample_an _edge method using the solution proposed in the post. Note you should also change the method declaration in LargeVis.h due the new type in the parameters.
|
Update: I tried this solution, but at progress of 2.84% I got again the "index out of range" crash. So, for the moment I am still using the fix that I wrote about earlier... |
I've running several tests without getting any segmentation fault. Please, could run tests using gdb and post the output here?. gdb --args ./largevis -input ... |
I believe there is a small bug in the search_reverse_thread call - I am not sure what the correct fix is, but the current version does not really make sense to me:
In the inner loop y gets assigned the index of a connected node, but then y is not being used at all. Since it's supposed to be a backwards search my guess is that the fix would be to replace head[x] with head[y] in the inner loop - so there is a search back from the other edges neighbors until the two paths meet.
The text was updated successfully, but these errors were encountered: