aboutsummaryrefslogtreecommitdiffstats
path: root/src/algorithms.py
diff options
context:
space:
mode:
authorjeanpouget-abadie <jean.pougetabadie@gmail.com>2015-02-01 19:21:59 -0500
committerjeanpouget-abadie <jean.pougetabadie@gmail.com>2015-02-01 20:02:06 -0500
commit0482865b3fc128964584db1af66be9fb0783a4af (patch)
tree0034bbe5184c11f874cd14f30ceed01fcb8f776d /src/algorithms.py
parentc92e95095b17fdbceb980c0edbf21779024fa5e3 (diff)
downloadcascades-0482865b3fc128964584db1af66be9fb0783a4af.tar.gz
small changes to optimization functions
Diffstat (limited to 'src/algorithms.py')
-rw-r--r--src/algorithms.py9
1 files changed, 7 insertions, 2 deletions
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: