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.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/make_plots.py b/src/make_plots.py
index bfe78f8..18864d3 100644
--- a/src/make_plots.py
+++ b/src/make_plots.py
@@ -27,6 +27,19 @@ def compare_greedy_and_lagrange_cs284r():
algorithms.correctness_measure(G, G_hat, print_values=True)
+def watts_strogatz(n_cascades, lbda, passed_function):
+ """
+ Test running time on different algorithms
+ """
+ G = cascade_creation.InfluenceGraph(max_proba=1, min_proba=.2)
+ G.import_from_file("../datasets/watts_strogatz_500_80_point3.txt")
+ A = cascade_creation.generate_cascades(G, p_init=.05, n_cascades=n_cascades)
+
+ G_hat = algorithms.recovery_passed_function(G, A,
+ passed_function=passed_function,
+ floor_cstt=.1, lbda=lbda, n_cascades=1000)
+
+
def test():
"""
unit test
@@ -41,4 +54,5 @@ def test():
if __name__=="__main__":
- test()
+ watts_strogatz(n_cascades=1000, lbda=.001, passed_function=
+ convex_optimization.sparse_recovery)