aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--paper/figures/kronecker_l2_norm.pdfbin0 -> 30708 bytes
-rw-r--r--paper/figures/kronecker_l2_norm_nonsparse.pdfbin0 -> 30729 bytes
-rw-r--r--paper/figures/watts_strogatz.pdfbin13567 -> 30785 bytes
-rw-r--r--paper/paper.tex2
-rw-r--r--paper/sections/experiments.tex19
-rw-r--r--src/convex_optimization.py2
-rw-r--r--src/make_plots.py60
7 files changed, 69 insertions, 14 deletions
diff --git a/paper/figures/kronecker_l2_norm.pdf b/paper/figures/kronecker_l2_norm.pdf
new file mode 100644
index 0000000..5177233
--- /dev/null
+++ b/paper/figures/kronecker_l2_norm.pdf
Binary files differ
diff --git a/paper/figures/kronecker_l2_norm_nonsparse.pdf b/paper/figures/kronecker_l2_norm_nonsparse.pdf
new file mode 100644
index 0000000..18ceabf
--- /dev/null
+++ b/paper/figures/kronecker_l2_norm_nonsparse.pdf
Binary files differ
diff --git a/paper/figures/watts_strogatz.pdf b/paper/figures/watts_strogatz.pdf
index 79df8d4..ddaa525 100644
--- a/paper/figures/watts_strogatz.pdf
+++ b/paper/figures/watts_strogatz.pdf
Binary files differ
diff --git a/paper/paper.tex b/paper/paper.tex
index 1201b0f..36e87be 100644
--- a/paper/paper.tex
+++ b/paper/paper.tex
@@ -41,7 +41,7 @@
% note in the first column to ``Proceedings of the...''
%\usepackage[accepted]{icml2015}
\usepackage[utf8]{inputenc}
-
+\usepackage{caption}
% The \icmltitle you define below is probably too long as a header.
% Therefore, a short form for the running title is supplied here:
\icmltitlerunning{Sparse Recovery for Graph Inference}
diff --git a/paper/sections/experiments.tex b/paper/sections/experiments.tex
index 600cac3..ccd82ce 100644
--- a/paper/sections/experiments.tex
+++ b/paper/sections/experiments.tex
@@ -3,15 +3,18 @@
\caption{Precision-Recall curve Holme-Kim Model. 200 nodes, 16200 edges.}
\end{figure}
-\begin{figure}
-\includegraphics[scale=.4]{figures/watts_strogatz.pdf}
-\caption{Watts-Strogatz Model. 200 nodes, 20000 edges.}
-\end{figure}
+\begin{table*}[t]
+\centering
+\begin{tabular}{c c c c}
-\begin{figure}
-\includegraphics[scale=.4]{figures/barabasi_albert.pdf}
-\caption{Barabasi Model.}
-\end{figure}
+\includegraphics[scale=.21]{figures/barabasi_albert.pdf}
+& \includegraphics[scale=.21]{figures/watts_strogatz.pdf}
+& \includegraphics[scale=.23]{figures/kronecker_l2_norm.pdf}
+& \includegraphics[scale=.23]{figures/kronecker_l2_norm_nonsparse.pdf}\\
+(a) & (b) & (c) & (d)
+\end{tabular}
+\captionof{figure}{blabla}
+\end{table*}
In this section, we validate empirically the results and assumptions of Section~\ref{sec:results} for different initializations of parameters ($n$, $m$, $\lambda$) and for varying levels of sparsity. We compare our algorithm to two different state-of-the-art algorithms: \textsc{greedy} and \textsc{mle} from \cite{Netrapalli:2012}. As an extra benchmark, we also introduce a new algorithm \textsc{lasso}, which approximates our \textsc{sparse mle} algorithm. We find empirically that \textsc{lasso} is highly robust, and can be computed more efficiently than both \textsc{mle} and \textsc{sparse mle} without sacrificing for performance.
diff --git a/src/convex_optimization.py b/src/convex_optimization.py
index 8dc6f82..0d506e1 100644
--- a/src/convex_optimization.py
+++ b/src/convex_optimization.py
@@ -90,7 +90,7 @@ def diff_and_opt(M_val, w_val, f_x, f_xz):
def F(x=None, z=None):
if x is None:
- return 0, cvxopt.matrix(-.001, (n,1))
+ return 0, cvxopt.matrix(-.1, (n,1))
elif z is None:
y, y_diff = f_x(x, M_val, w_val)
return cvxopt.matrix(float(y), (1, 1)),\
diff --git a/src/make_plots.py b/src/make_plots.py
index d83eb2c..792e325 100644
--- a/src/make_plots.py
+++ b/src/make_plots.py
@@ -108,6 +108,58 @@ def plot_barabasi_albert_graph():
+def plot_kronecker_l2norm():
+ plt.clf()
+ fig = plt.figure(1)
+ x = [50, 100, 500, 1000, 2000]
+ sparse_recov = [62, 60, 36, 28, 21]
+ max_likel = [139, 101, 42, 31, 25]
+ lasso = [50, 48, 33, 29, 23]
+
+ fig, ax = plt.subplots()
+
+ 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.grid(color="lightgrey")
+ 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")
+ ax.set_xticks(x)
+ ax.set_xticklabels(tuple(x))
+ plt.savefig("../paper/figures/"+"kronecker_l2_norm.pdf")
+
+
+def plot_kronecker_l2norm_nonsparse():
+ plt.clf()
+ fig = plt.figure(1)
+ x = [50, 100, 500, 1000, 2000]
+ sparse_recov = [56, 55, 28, 21, 15]
+ max_likel = [125, 80, 35, 25, 20]
+ lasso = [47, 47, 27, 22, 17]
+
+ fig, ax = plt.subplots()
+
+ 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.grid(color="lightgrey")
+ 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")
+ ax.set_xticks(x)
+ ax.set_xticklabels(tuple(x))
+ plt.savefig("../paper/figures/"+"kronecker_l2_norm_nonsparse.pdf")
+
+
def plot_ROC_curve(figure_name):
"""
plot information in a pretty way
@@ -168,8 +220,8 @@ if __name__=="__main__":
#convex_optimization.type_lasso)
if 1:
compute_graph("../datasets/kronecker_graph_256_cross.txt",
- n_cascades=2000, lbda=0.1, min_proba=.2, max_proba=.7,
+ n_cascades=50, lbda=0., min_proba=.2, max_proba=.7,
passed_function=
- #convex_optimization.sparse_recovery,
- convex_optimization.type_lasso,
- sparse_edges=False) \ No newline at end of file
+ convex_optimization.sparse_recovery,
+ #convex_optimization.type_lasso,
+ sparse_edges=True) \ No newline at end of file