Long story short, I’m creating a graph using networkx and the lower the weights between nodes(edges) the better.
My problem is pagerank doesn’t like getting a weight of zero and gives me an error. So I was thinking is there a number that is essentially zero in python but not exactly zero. Something like 0.0000000000001?
or if my approach is really horrible(which I suspect it might) is there another way to deal with this? Pagerank recussivily gets a score and then normalizes it against the entire dataset so scores tend to be very low as dataset gets larger(think 1/billion nodes).
You can look at
sys.float_info.min, the value of the minimum positive normalized float. On my system, this is2.2250738585072014e-308.