Purely topological homology-based method to assign confidences to interactions in a network