aboutsummaryrefslogtreecommitdiffstats
path: root/jpa_test/algorithms.py
diff options
context:
space:
mode:
authorjeanpouget-abadie <jean.pougetabadie@gmail.com>2014-12-01 10:12:59 -0500
committerjeanpouget-abadie <jean.pougetabadie@gmail.com>2014-12-01 10:12:59 -0500
commitb1a6d4397bd1dc784a68987fc645eabe2bbcc8ec (patch)
tree4b683937a3c4cb32e75da37174e3c7dc9b1bc924 /jpa_test/algorithms.py
parentddbb95cbac65a74016839e253cda39466fa13308 (diff)
downloadcascades-b1a6d4397bd1dc784a68987fc645eabe2bbcc8ec.tar.gz
small bug fixes
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)