aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeanpouget-abadie <jean.pougetabadie@gmail.com>2015-02-06 11:03:50 -0500
committerjeanpouget-abadie <jean.pougetabadie@gmail.com>2015-02-06 11:03:50 -0500
commit07aaef11e08916bf022743b570566a78f0ec27df (patch)
tree9c88276c8db4d14d466ac0add2fb1753f8aa6205
parentf94bf128133f8dc3adaa81282ed7ce54b55dd528 (diff)
downloadcascades-07aaef11e08916bf022743b570566a78f0ec27df.tar.gz
something plot
-rw-r--r--paper/figures/ROC_curve.pdfbin13736 -> 49834 bytes
-rw-r--r--paper/figures/watts_strogatz_p_init.pdfbin14058 -> 30604 bytes
-rw-r--r--paper/sections/experiments.tex8
-rw-r--r--src/make_plots.py17
4 files changed, 13 insertions, 12 deletions
diff --git a/paper/figures/ROC_curve.pdf b/paper/figures/ROC_curve.pdf
index 27a8924..6b02080 100644
--- a/paper/figures/ROC_curve.pdf
+++ b/paper/figures/ROC_curve.pdf
Binary files differ
diff --git a/paper/figures/watts_strogatz_p_init.pdf b/paper/figures/watts_strogatz_p_init.pdf
index da6dc99..8fd9b8a 100644
--- a/paper/figures/watts_strogatz_p_init.pdf
+++ b/paper/figures/watts_strogatz_p_init.pdf
Binary files differ
diff --git a/paper/sections/experiments.tex b/paper/sections/experiments.tex
index f1b7d52..701d5e7 100644
--- a/paper/sections/experiments.tex
+++ b/paper/sections/experiments.tex
@@ -11,16 +11,16 @@
\includegraphics[scale=.3]{figures/barabasi_albert.pdf}
& \includegraphics[scale=.3]{figures/watts_strogatz.pdf}
& \includegraphics[scale=.3]{figures/ROC_curve.pdf} \\
-(a) Barabasi-Albert (F$1$ \emph{vs.} $n$) & (b) Watts-Strogatz (F$1$ \emph{vs.} $n$) & (c) Holme-Kilm (Prec-Recall) \\
+(a) Barabasi-Albert (F$1$ \emph{vs.} $n$) & (b) Watts-Strogatz (F$1$ \emph{vs.} $n$) & (c) Holme-Kim (Prec-Recall) \\
\includegraphics[scale=.3]{figures/kronecker_l2_norm.pdf}
& \includegraphics[scale=.3]{figures/kronecker_l2_norm_nonsparse.pdf}
& \includegraphics[scale=.3]{figures/watts_strogatz_p_init.pdf} \\
(d) Sparse Kronecker ($\ell_2$-norm \emph{vs.} $n$ ) & (e) Non-sparse Kronecker ($\ell_2$-norm \emph{vs.} $n$) & (f) Watts-Strogatz (F$1$ \emph{vs.} $p_{\text{init}}$)
\end{tabular}
\captionof{figure}{Figures (a) and (b) report the F$1$-score in $\log$ scale
-for 2 graphs: (a) Barabasi-Albert graph, $300$ nodes, $16200$ edges. (b)
-Watts-Strogatz graph, $300$ nodes, $4500$ edges. Figures (c) and (d) report the
-$\ell_2$-norm $\|\hat \Theta - \Theta\|_2$ for a Kronecker graph which is: (c) exactly sparse (d) non-exactly sparse}
+for 2 graphs as a function of the number of cascades $m$: (a) Barabasi-Albert graph, $300$ nodes, $16200$ edges. (b)
+Watts-Strogatz graph, $300$ nodes, $4500$ edges. Figure (c) plots the Precision-Recall curve for various values for $\lambda$ ofr a Holme-Kim graph ($200$ nodes, $9772$ edges). Figures (d) and (e) report the
+$\ell_2$-norm $\|\hat \Theta - \Theta\|_2$ for a Kronecker graph which is: (d) exactly sparse (e) non-exactly sparse, as a function of the number of cascades $n$. Figure (f) plots the F$1$-score for the Watts-Strogatz graph as a function of $p_{init}$}
\label{fig:four_figs}
\end{table*}
diff --git a/src/make_plots.py b/src/make_plots.py
index c5a50f6..9615d1b 100644
--- a/src/make_plots.py
+++ b/src/make_plots.py
@@ -193,7 +193,7 @@ def plot_ROC_curve(figure_name):
color="orange", label="Lasso-50 cascades")
ax.plot(recall_sparse_50, precision_sparse_50, 'ko-',
color="cornflowerblue", label="Our Method-50 cascades")
- plt.legend(loc="upper right")
+ plt.legend(loc="upper right", fontsize=14)
plt.savefig("../paper/figures/"+"ROC_curve.pdf")
@@ -208,20 +208,21 @@ def plot_kronecker_l2norm_nonsparse():
fig, ax = plt.subplots()
- #plt.subplots_adjust(bottom=.2, top=.85)
- #plt.xticks(ha="right", rotation=45)
+ plt.subplots_adjust(bottom=.2, top=.85)
+ plt.xticks(ha="right", rotation=45)
- #plt.axis((50, 2000, 0, 145))
- plt.xlabel("Number of Cascades")
- plt.ylabel("l2-norm")
+ plt.axis((0, .21, .05, .8))
+ plt.xlabel("Number of Cascades", fontsize=20)
+ plt.ylabel("l2-norm", fontsize=20)
plt.grid(color="lightgrey")
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="cornflowerblue", label="MLE")
ax.plot(x, sparse_recov, 'ko-', color="k", label="Our Method")
- plt.legend(loc="upper right")
+ plt.legend(loc="upper right", fontsize=18)
ax.set_xticks(x)
- ax.set_xticklabels(tuple(x))
+ ax.set_yticklabels(tuple([.1, .2, .3, .4, .5, .6, .7, .8]), fontsize=20)
+ ax.set_xticklabels(tuple(x), fontsize=20)
plt.savefig("../paper/figures/"+"watts_strogatz_p_init.pdf")