aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--paper/figures/watts_strogatz.pdfbin0 -> 13549 bytes
-rw-r--r--paper/sections/experiments.tex2
-rw-r--r--src/make_plots.py20
3 files changed, 14 insertions, 8 deletions
diff --git a/paper/figures/watts_strogatz.pdf b/paper/figures/watts_strogatz.pdf
new file mode 100644
index 0000000..f743d87
--- /dev/null
+++ b/paper/figures/watts_strogatz.pdf
Binary files differ
diff --git a/paper/sections/experiments.tex b/paper/sections/experiments.tex
index 5d1ae45..7b5d990 100644
--- a/paper/sections/experiments.tex
+++ b/paper/sections/experiments.tex
@@ -1,5 +1,5 @@
\begin{figure}
-\includegraphics[scale=.4]{figures/first_try.pdf}
+\includegraphics[scale=.4]{figures/watts_strogatz.pdf}
\caption{Watts-Strogatz Model. 300 nodes, 20000 edges.}
\end{figure}
diff --git a/src/make_plots.py b/src/make_plots.py
index daf5ca3..aa77365 100644
--- a/src/make_plots.py
+++ b/src/make_plots.py
@@ -49,21 +49,27 @@ def plot_graph(figure_name):
plot information in a pretty way
"""
plt.clf()
- x = [50, 100, 500, 1000, 2000, 5000]
+ fig = plt.figure(1)
+ labels = [50, 100, 500, 1000, 2000, 5000]
+ x = [np.log(50), np.log(100), np.log(500), np.log(1000), np.log(2000), np.log(5000)]
sparse_recov = [.25, .32, .7, .82, .89, .92]
max_likel = [.21, .29, .67, .8, .87, .9]
- lasso = [.07, .30, .46, .65, 0, 0]
+ lasso = [.07, .30, .46, .65, .86, .89]
greedy = [.09, .15, .4, .63, .82, .92]
- plt.axis((0, 5500, 0, 1))
+ fig, ax = plt.subplots()
+
+ plt.axis((np.log(45), np.log(5500), 0, 1))
plt.xlabel("Number of Cascades")
plt.ylabel("F1 score")
plt.grid(color="lightgrey")
- plt.plot(x, greedy, 'ko-', color="lightseagreen", label='Greedy')
- plt.plot(x, lasso, 'ko-', color="orange", label="Lasso")
- plt.plot(x, max_likel, 'ko-', color="coral", label="MLE")
- plt.plot(x, sparse_recov, 'ko-', color="k", label="Sparse MLE")
+ ax.plot(x, greedy, 'ko-', color="lightseagreen", label='Greedy')
+ ax.plot(x, lasso, 'ko-', color="orange", label="Lasso")
+ ax.plot(x, max_likel, 'ko-', color="coral", label="MLE")
+ ax.plot(x, sparse_recov, 'ko-', color="k", label="Our Method")
plt.legend(loc="lower right")
+ ax.set_xticks(x)
+ ax.set_xticklabels(tuple(labels))
plt.savefig("../paper/figures/"+figure_name)