diff --git a/paper/main.tex b/paper/main.tex index c8a0838..aeec18d 100644 --- a/paper/main.tex +++ b/paper/main.tex @@ -45,7 +45,8 @@ \usepackage{graphicx} \graphicspath{ {./pictures/}, - {../fig/} + {../fig/}, + {../} } \usepackage[backend=bibtex, style=numeric]{biblatex} @@ -159,9 +160,11 @@ Potentially, analyze how the rankings of different similarities look like. \begin{figure} \begin{subfigure}{0.8\textwidth} +\centering \includegraphics[width=\textwidth]{job-timeseries4296426} \caption{Job-S} \label{fig:job-S} \end{subfigure} +\centering \caption{Reference jobs: timeline of mean IO activity} \label{fig:refJobs} @@ -171,19 +174,76 @@ Potentially, analyze how the rankings of different similarities look like. \begin{figure}\ContinuedFloat \begin{subfigure}{0.8\textwidth} +\centering \includegraphics[width=\textwidth]{job-timeseries5024292} \caption{Job-M} \label{fig:job-M} \end{subfigure} +\centering \begin{subfigure}{0.8\textwidth} +\centering \includegraphics[width=\textwidth]{job-timeseries7488914-30.pdf} \caption{Job-L (first 30 segments of 400; remaining segments are similar)} \label{fig:job-L} \end{subfigure} +\centering \caption{Reference jobs: timeline of mean IO activity; non-shown timelines are 0} \end{figure} + +\begin{figure} + +\begin{subfigure}{0.8\textwidth} +\centering +\includegraphics[width=\textwidth]{job_similarities_4296426-out/ecdf.png} +\caption{Job-S} \label{fig:ecdf-job-S} +\end{subfigure} +\centering + +\begin{subfigure}{0.8\textwidth} +\centering +\includegraphics[width=\textwidth]{job_similarities_5024292-out/ecdf.png} +\caption{Job-M} \label{fig:ecdf-job-M} +\end{subfigure} +\centering + +\begin{subfigure}{0.8\textwidth} +\centering +\includegraphics[width=\textwidth]{job_similarities_7488914-out/ecdf.png} +\caption{Job-L} \label{fig:ecdf-job-L} +\end{subfigure} +\centering +\caption{Empirical cumulative density function} +\label{fig:ecdf} +\end{figure} + + +\begin{figure} + +\begin{subfigure}{0.5\textwidth} +\centering +\includegraphics[width=\textwidth]{job_similarities_4296426-out/hist-sim} +\caption{Job-S} \label{fig:hist-job-S} +\end{subfigure} +\begin{subfigure}{0.5\textwidth} +\centering +\includegraphics[width=\textwidth]{job_similarities_5024292-out/hist-sim} +\caption{Job-M} \label{fig:hist-job-M} +\end{subfigure} + +\begin{subfigure}{0.5\textwidth} +\centering +\includegraphics[width=\textwidth]{job_similarities_7488914-out/hist-sim} +\caption{Job-L} \label{fig:hist-job-L} +\end{subfigure} +\centering +\caption{Histogram for the number of jobs (bin width: 2.5\%, numbers are the actual job counts)} +\label{fig:ecdf} +\end{figure} + + + \section{Summary and Conclusion} \label{sec:summary} diff --git a/scripts/plot.R b/scripts/plot.R index 6f59252..6d63b30 100755 --- a/scripts/plot.R +++ b/scripts/plot.R @@ -3,16 +3,15 @@ library(ggplot2) library(dplyr) require(scales) -#library(hrbrthemes) -file = "job_similarities_5024292.csv" -file = "job_similarities_7488914.csv" +plotjobs = FALSE # Color scheme plotcolors <- c("#CC0000", "#FFA500", "#FFFF00", "#008000", "#9999ff", "#000066") # Parse job from command line args = commandArgs(trailingOnly = TRUE) +file = "job_similarities_5024292.csv" # for manual execution file = args[1] data = read.csv(file) @@ -22,7 +21,7 @@ data$alg_id = as.factor(data$alg_id) cat("Job count:") cat(nrow(data)) -# empirical cummulative density function (ECDF) +# empirical cumulative density function (ECDF) ggplot(data, aes(similarity, color=alg_name, group=alg_name)) + stat_ecdf(geom = "step") + xlab("SIM") + ylab("Fraction of jobs") + theme(legend.position=c(0.9, 0.4)) + scale_color_brewer(palette = "Set2") ggsave("ecdf.png", width=8, height=3) @@ -52,8 +51,11 @@ plotJobs = function(jobs){ # print the job timelines r = e[ordered, ] - #prefix = do.call("sprintf", list("%s-%.0f-", level, r$similarity)) - #system(sprintf("scripts/plot-single-job.py %s %s", paste(r$jobid, collapse=","), paste(prefix, collapse=","))) + + if (plotjobs) { + prefix = do.call("sprintf", list("%s-%.0f-", level, r$similarity)) + system(sprintf("scripts/plot-single-job.py %s %s", paste(r$jobid, collapse=","), paste(prefix, collapse=","))) + } } # Store the job ids in a table, each column is one algorithm