Exemple #1
0
 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
Exemple #2
0
    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()
Exemple #3
0
    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
Exemple #4
0
    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
Exemple #5
0
    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()
Exemple #6
0
 def scores(self, G):
     """ Returns the triangle counts of the input graph. """
     triangleScore = TriangleEdgeScore(G)
     triangleScore.run()
     return triangleScore.scores()
Exemple #7
0
 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()
	def scores(self, G):
		""" Returns the triangle counts of the input graph. """
		triangleScore = TriangleEdgeScore(G)
		triangleScore.run()
		return triangleScore.scores()