aboutsummaryrefslogtreecommitdiffstats
path: root/src/make_plots.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/make_plots.py')
-rw-r--r--src/make_plots.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/make_plots.py b/src/make_plots.py
index 5aab683..18d0874 100644
--- a/src/make_plots.py
+++ b/src/make_plots.py
@@ -22,7 +22,7 @@ def compare_greedy_and_lagrange_cs284r():
#Lagrange Objective
G_hat = algorithms.recovery_l1obj_l2constraint(G, A,
- passed_function=convex_optimization.sparse_recovery,
+ passed_function=convex_optimization.type_lasso,
floor_cstt=.1, lbda=10)
algorithms.correctness_measure(G, G_hat, print_values=True)
@@ -31,8 +31,13 @@ def test():
"""
unit test
"""
- if 1:
- compare_greedy_and_lagrange_cs284r()
+ G = cascade_creation.InfluenceGraph(max_proba=.3)
+ G.erdos_init(n=10, p=.2)
+ A = cascade_creation.generate_cascades(G, p_init=.2, n_cascades=100)
+ G_hat = algorithms.recovery_l1obj_l2constraint(G, A,
+ passed_function=convex_optimization.sparse_recovery,
+ floor_cstt=.1, lbda=10)
+ algorithms.correctness_measure(G, G_hat, print_values=True)
if __name__=="__main__":
test()