clique / src /synthetic /Table1_utils /appendix_f1_vs_pout.tikz
qingy2024's picture
Upload folder using huggingface_hub
bf620c6 verified
% Auto-generated by make_appendix_f1_vs_pout_tikz.py
\begin{figure}[h]
\centering
\begin{tikzpicture}
\begin{axis}[
width=0.9\linewidth, height=5cm,
xlabel={$p_{\text{out}}$}, ylabel={F1},
xmin=0.22, xmax=0.48, ymin=0, ymax=1.02,
grid=both,
legend to name=f1legend,
legend columns=3,
legend cell align=left,
legend image post style={xscale=1.2},
legend style={draw=none, fill=none, font=\scriptsize, /tikz/every even column/.append style={column sep=0.75em}}
]
% --- L-RMC (ours)
\addplot+[mark=o, thick, draw=blue!80!black]
coordinates { (0.01,0.646) (0.05,0.946) (0.10,0.946) (0.15,0.946) (0.20,0.945) (0.25,0.943) (0.35,0.888) (0.45,0.752)};
\addlegendentry{L-RMC (ours)}
\addplot[name path=upperLRMC, draw=none, forget plot]
coordinates { (0.01,0.877) (0.05,0.975) (0.10,0.975) (0.15,0.975) (0.20,0.973) (0.25,0.971) (0.35,0.986) (0.45,0.926)};
\addplot[name path=lowerLRMC, draw=none, forget plot]
coordinates { (0.01,0.415) (0.05,0.917) (0.10,0.917) (0.15,0.917) (0.20,0.917) (0.25,0.916) (0.35,0.791) (0.45,0.579)};
\addplot[fill=blue!80!black, fill opacity=0.30, draw=none, forget plot]
fill between [of=upperLRMC and lowerLRMC];
% --- QuasiClique
\addplot+[mark=o, thick, draw=orange!80!black]
coordinates { (0.01,0.234) (0.05,0.234) (0.10,0.234) (0.15,0.234) (0.20,0.234) (0.25,0.234) (0.35,0.234) (0.45,0.209)};
\addlegendentry{QuasiClique}
\addplot[name path=upperQuasiClique, draw=none, forget plot]
coordinates { (0.01,0.289) (0.05,0.289) (0.10,0.289) (0.15,0.289) (0.20,0.289) (0.25,0.289) (0.35,0.289) (0.45,0.279)};
\addplot[name path=lowerQuasiClique, draw=none, forget plot]
coordinates { (0.01,0.179) (0.05,0.179) (0.10,0.179) (0.15,0.179) (0.20,0.179) (0.25,0.179) (0.35,0.179) (0.45,0.139)};
\addplot[fill=orange!80!black, fill opacity=0.30, draw=none, forget plot]
fill between [of=upperQuasiClique and lowerQuasiClique];
% --- Spectral Clustering
\addplot+[mark=o, thick, draw=green!60!black]
coordinates { (0.01,0.181) (0.05,0.191) (0.10,0.179) (0.15,0.179) (0.20,0.176) (0.25,0.179) (0.35,0.160) (0.45,0.147)};
\addlegendentry{Spectral Clustering}
\addplot[name path=upperSpectral, draw=none, forget plot]
coordinates { (0.01,0.203) (0.05,0.213) (0.10,0.204) (0.15,0.200) (0.20,0.203) (0.25,0.208) (0.35,0.189) (0.45,0.174)};
\addplot[name path=lowerSpectral, draw=none, forget plot]
coordinates { (0.01,0.159) (0.05,0.169) (0.10,0.155) (0.15,0.158) (0.20,0.149) (0.25,0.150) (0.35,0.130) (0.45,0.120)};
\addplot[fill=green!60!black, fill opacity=0.30, draw=none, forget plot]
fill between [of=upperSpectral and lowerSpectral];
% --- Densest Subgraph
\addplot+[mark=o, thick, draw=red!80!black]
coordinates { (0.01,1.000) (0.05,0.400) (0.10,0.113) (0.15,0.113) (0.20,0.113) (0.25,0.113) (0.35,0.113) (0.45,0.113)};
\addlegendentry{Densest Subgraph}
\addplot[name path=upperDensest, draw=none, forget plot]
coordinates { (0.01,1.000) (0.05,0.651) (0.10,0.130) (0.15,0.130) (0.20,0.130) (0.25,0.130) (0.35,0.130) (0.45,0.130)};
\addplot[name path=lowerDensest, draw=none, forget plot]
coordinates { (0.01,1.000) (0.05,0.148) (0.10,0.096) (0.15,0.096) (0.20,0.096) (0.25,0.096) (0.35,0.096) (0.45,0.096)};
\addplot[fill=red!80!black, fill opacity=0.30, draw=none, forget plot]
fill between [of=upperDensest and lowerDensest];
% --- k-core
\addplot+[mark=o, thick, draw=purple!70!black]
coordinates { (0.01,0.993) (0.05,0.516) (0.10,0.113) (0.15,0.113) (0.20,0.113) (0.25,0.113) (0.35,0.113) (0.45,0.113)};
\addlegendentry{k-core}
\addplot[name path=upperkcore, draw=none, forget plot]
coordinates { (0.01,0.995) (0.05,0.772) (0.10,0.130) (0.15,0.130) (0.20,0.130) (0.25,0.130) (0.35,0.130) (0.45,0.130)};
\addplot[name path=lowerkcore, draw=none, forget plot]
coordinates { (0.01,0.991) (0.05,0.260) (0.10,0.096) (0.15,0.096) (0.20,0.096) (0.25,0.096) (0.35,0.096) (0.45,0.096)};
\addplot[fill=purple!70!black, fill opacity=0.30, draw=none, forget plot]
fill between [of=upperkcore and lowerkcore];
\end{axis}
\end{tikzpicture}
% Place the short legend collected above
\pgfplotslegendfromname{f1legend}
\caption{F1 vs $p_{\text{out}}$ (averaged over $k$ and $p_{\text{in}}$). Shaded bands show 95\% CIs. The baselines are fully described in Section~\ref{sec:synthetic-planted}. Spectral Clustering uses the principal non-trivial eigenvector; Densest Subgraph is Charikar's peeling; k-core reports the densest component; QuasiClique optimizes edge density.}
\end{figure}