#igraph.summary(c.Graph) #c.make_Graph(15, 200, prob = 0.1) #igraph.summary(c.Graph) #print len(c.clique_list) #g = c.Graph.copy() #d = DataPolishing(g) #igraph.summary(d.Graph) #print len(d.Graph.maximal_cliques(min = 3)) #igraph.write(d.Graph, "randam_clique_5000.gml") #d.data_polish(polish_ratio = pr) #igraph.summary(d.Graph) #print len(d.Graph.maximal_cliques(min = 3)) #igraph.write(d.Graph, "polished_clique_5000.gml") #print "recall = " , c.recall(d.Graph) #print "precision = " , c.precision(d.Graph) #print "accuracy = " , c.accuracy(d.Graph) g = igraph.read("twitter_graph.gml") a = DataPolishing(g) print "original:" igraph.summary(a.Graph) print len(a.Graph.maximal_cliques(min = 3)) a.data_polish(polish_ratio = pr) print "polished" igraph.summary(a.Graph) print len(a.Graph.maximal_cliques(min = 3)) igraph.write(a.Graph, "polished_twitter_grapht.gml")
#a = DataPolishing(g) #igraph.summary(a.Graph) #print a.Graph.maximal_cliques(min = 3) #print len(a.Graph.maximal_cliques(min = 3)) #a.data_polish(polish_ratio = pr) #print a.Graph.maximal_cliques(min = 3) #print len(a.Graph.maximal_cliques(min = 3)) #igraph.write(a.Graph, "polished_grapht.gml") #igraph.summary(a.Graph) c = Experiment(5000) igraph.summary(c.Graph) c.make_Graph(30, 100) igraph.summary(c.Graph) #print len(c.clique_list) g = c.Graph.copy() d = DataPolishing(g) igraph.summary(d.Graph) print len(d.Graph.maximal_cliques(min=3)) #igraph.write(d.Graph, "randam_clique_5000.gml") d.data_polish(polish_ratio=pr) igraph.summary(d.Graph) print len(d.Graph.maximal_cliques(min=3)) #igraph.write(d.Graph, "polished_clique_5000.gml") print "recall = ", c.recall(d.Graph) print "precision = ", c.precision(d.Graph) print "accuracy = ", c.accuracy(d.Graph)
#a = DataPolishing(g) #igraph.summary(a.Graph) #print a.Graph.maximal_cliques(min = 3) #print len(a.Graph.maximal_cliques(min = 3)) #a.data_polish(polish_ratio = pr) #print a.Graph.maximal_cliques(min = 3) #print len(a.Graph.maximal_cliques(min = 3)) #igraph.write(a.Graph, "polished_grapht.gml") #igraph.summary(a.Graph) c = Experiment(5000) igraph.summary(c.Graph) c.make_Graph(30,100) igraph.summary(c.Graph) #print len(c.clique_list) g = c.Graph.copy() d = DataPolishing(g) igraph.summary(d.Graph) print len(d.Graph.maximal_cliques(min = 3)) #igraph.write(d.Graph, "randam_clique_5000.gml") d.data_polish(polish_ratio = pr) igraph.summary(d.Graph) print len(d.Graph.maximal_cliques(min = 3)) #igraph.write(d.Graph, "polished_clique_5000.gml") print "recall = " , c.recall(d.Graph) print "precision = " , c.precision(d.Graph) print "accuracy = " , c.accuracy(d.Graph)
#igraph.summary(c.Graph) #c.make_Graph(15, 200, prob = 0.1) #igraph.summary(c.Graph) #print len(c.clique_list) #g = c.Graph.copy() #d = DataPolishing(g) #igraph.summary(d.Graph) #print len(d.Graph.maximal_cliques(min = 3)) #igraph.write(d.Graph, "randam_clique_5000.gml") #d.data_polish(polish_ratio = pr) #igraph.summary(d.Graph) #print len(d.Graph.maximal_cliques(min = 3)) #igraph.write(d.Graph, "polished_clique_5000.gml") #print "recall = " , c.recall(d.Graph) #print "precision = " , c.precision(d.Graph) #print "accuracy = " , c.accuracy(d.Graph) g = igraph.read("twitter_graph.gml") a = DataPolishing(g) print "original:" igraph.summary(a.Graph) print len(a.Graph.maximal_cliques(min=3)) a.data_polish(polish_ratio=pr) print "polished" igraph.summary(a.Graph) print len(a.Graph.maximal_cliques(min=3)) igraph.write(a.Graph, "polished_twitter_grapht.gml")