aboutsummaryrefslogtreecommitdiffstats
path: root/jpa_test/algorithms.py
diff options
context:
space:
mode:
Diffstat (limited to 'jpa_test/algorithms.py')
-rw-r--r--jpa_test/algorithms.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/jpa_test/algorithms.py b/jpa_test/algorithms.py
index cf4ce50..76a3c51 100644
--- a/jpa_test/algorithms.py
+++ b/jpa_test/algorithms.py
@@ -44,7 +44,9 @@ def sparserecovery(G, cascades):
G_hat.add_nodes_from(G.nodes())
for node in G_hat.nodes():
M, w = cascade_creation.icc_matrixvector_for_node(cascades, node)
+ M = M.astype("int8")
edges_node = convex_optimization.l1regls(M,w)
+ print edges_node
def correctness_measure(G, G_hat):
@@ -64,7 +66,7 @@ def test():
unit test
"""
G = cascade_creation.InfluenceGraph(max_proba = .3)
- G.erdos_init(n = 100, p = .1)
+ G.erdos_init(n = 100, p = .5)
import time
t0 = time.time()
A = cascade_creation.generate_cascades(G, .1, 100)