def get_value(self, graph: Graph): self.logger.debug('calculate number of triangles') graph.indexEdges() triangles = TriangleEdgeScore(graph).run().scores() res = [] for item in self.process_centrality(triangles): res.append(float(item)) return res
def scores(self, G): """ Returns an edge attribute that holds for each edge the minimum parameter value such that the edge is contained in the sparsified graph. Keyword arguments: G -- the input graph """ triangles = TriangleEdgeScore(G).run().scores() localSimScore = LocalSimilarityScore(G, triangles) localSimScore.run() return localSimScore.scores()
def scores(self, G): """ Returns an edge attribute that holds for each edge the minimum jaccard filter value such that the edge is contained in the sparsified graph. Keyword arguments: G -- the input graph """ triangles = TriangleEdgeScore(G).run().scores() a_sj = PrefixJaccardScore(G, triangles).run().scores() return a_sj
def scores(self, G): """ Returns an edge attribute that holds for each edge the maximum parameter value such that the edge is contained in the sparsified graph. Keyword arguments: G -- the input graph """ triangles = TriangleEdgeScore(G).run().scores() ms = MultiscaleScore(G, triangles) ms.run() a_ms = ms.scores() return a_ms
def scores(self, G): """ Returns an edge attribute that holds for each edge the minimum parameter value such that the edge is contained in the sparsified graph. Keyword arguments: G -- the input graph """ triangles = TriangleEdgeScore(G).run().scores() simmelianOverlap = SimmelianOverlapScore(G, triangles, self.maxRank) simmelianOverlap.run() return simmelianOverlap.scores()
def scores(self, G): """ Returns the triangle counts of the input graph. """ triangleScore = TriangleEdgeScore(G) triangleScore.run() return triangleScore.scores()
def scores(self, G): """ Returns the jaccard coefficient of the neighborhoods of the two incident nodes """ triangles = TriangleEdgeScore(G).run().scores() return JaccardSimilarityAttributizer(G, triangles).getAttribute()