-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Hi, I think I may have found a small bug in embeddingSD.hpp
Inside "infer_parameters", at line 2409, the code enters a while loop to find the right beta to reproduce the input average clustering.
If beta gets too close to D, beta is set equal to BETA_ABS_MIN_DIM (line 2434) and the loop is broken.
The problem is that the other parameters (e.g., mu and kappas) were inferred at lines 2415-2420 with the previous value of beta, and are not inferred again after beta has been updated to BETA_ABS_MIN_DIM.
To the best of my understanding, this means that (at least when the clustering of the original network is very small) the final inferred parameters reported in the inf_log file are inconsistent.
As a countercheck, I computed mu using the beta and average degree reported in the inf_log file and obtained a different value with respect to the mu indicated in the same file.
As a minimum working example, you can create a BA graph with average degree 10 (e.g. running G = igraph.Graph.Barabasi(1000,5)), dump the edge list and feed it to mercator with D=1. The inf_log file should report the line
WARNING: value too close to 1, using beta = 1.0058
(or something similar), and the values of beta and mu indicated in the inf_log file should be inconsistent, i.e.
I would be happy to know if you agree that that's a bug or if there's anything I'm missing.
If you want to discuss it or need any additional info, do not hesitate to contact me at ste.guarino@gmail.com