From 0482865b3fc128964584db1af66be9fb0783a4af Mon Sep 17 00:00:00 2001 From: jeanpouget-abadie Date: Sun, 1 Feb 2015 19:21:59 -0500 Subject: small changes to optimization functions --- src/algorithms.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/algorithms.py') diff --git a/src/algorithms.py b/src/algorithms.py index c880a7b..29de661 100644 --- a/src/algorithms.py +++ b/src/algorithms.py @@ -39,6 +39,11 @@ def recovery_l1obj_l2constraint(G, cascades, floor_cstt, passed_function, """ G_hat = cascade_creation.InfluenceGraph(max_proba=None) G_hat.add_nodes_from(G.nodes()) + + #### + print(G.nodes()) + #### + for node in G_hat.nodes(): print(node) try: @@ -85,10 +90,10 @@ def test(): unit test """ G = cascade_creation.InfluenceGraph(max_proba = .8) - G.erdos_init(n = 100, p = .05) + G.erdos_init(n = 10, p = .2) import time t0 = time.time() - A = cascade_creation.generate_cascades(G, .2, 10000) + A = cascade_creation.generate_cascades(G, .2, 1000) if 1: G_hat = greedy_prediction(G, A) if 0: -- cgit v1.2.3-70-g09d2