summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cs284_poster/SEASLogo_CMYK_OnRed.eps (renamed from poster/SEASLogo_CMYK_OnRed.eps)bin628726 -> 628726 bytes
-rw-r--r--cs284_poster/cascades.pdf (renamed from poster/cascades.pdf)bin20267 -> 20267 bytes
-rw-r--r--cs284_poster/hmcposter.cls (renamed from poster/hmcposter.cls)0
-rw-r--r--cs284_poster/hmcthesisposter.cls (renamed from poster/hmcthesisposter.cls)0
-rw-r--r--cs284_poster/lcc-newark.pdf (renamed from cs284/lcc-newark.pdf)bin413254 -> 413254 bytes
-rw-r--r--cs284_poster/mean-100-sim2.pdf (renamed from poster/mean-100-sim2.pdf)bin4787 -> 4787 bytes
-rw-r--r--cs284_poster/poster.tex (renamed from poster/poster.tex)0
-rw-r--r--cs284_poster/yale_newlogo_yaleblue.eps (renamed from poster/yale_newlogo_yaleblue.eps)0
-rw-r--r--cs284_report/cascade-size-distribution.pdf (renamed from cs284/cascade-size-distribution.pdf)bin5176 -> 5176 bytes
-rw-r--r--cs284_report/cascades2.pdf (renamed from cs284/cascades2.pdf)bin22586 -> 22586 bytes
-rw-r--r--cs284_report/infection-dates.pdf (renamed from cs284/infection-dates.pdf)bin5102 -> 5102 bytes
-rw-r--r--cs284_report/lcc-dd.pdf (renamed from cs284/lcc-dd.pdf)bin5384 -> 5384 bytes
-rw-r--r--cs284_report/lcc-newark.pdf (renamed from poster/lcc-newark.pdf)bin413254 -> 413254 bytes
-rw-r--r--cs284_report/ll.pdf (renamed from cs284/ll.pdf)bin368308 -> 368308 bytes
-rw-r--r--cs284_report/main.bib (renamed from cs284/main.bib)0
-rw-r--r--cs284_report/main.tex (renamed from cs284/main.tex)0
-rw-r--r--cs284_report/sim23-mean-100.pdf (renamed from cs284/sim23-mean-100.pdf)bin5047 -> 5047 bytes
-rw-r--r--cs284_report/sim23-mean-time.pdf (renamed from cs284/sim23-mean-time.pdf)bin4940 -> 4940 bytes
-rw-r--r--hawkes_experiments/README.txt (renamed from hawkes/README.txt)0
-rw-r--r--hawkes_experiments/cause.py (renamed from hawkes/cause.py)0
-rw-r--r--hawkes_experiments/data.py (renamed from hawkes/data.py)0
-rw-r--r--hawkes_experiments/main.py (renamed from hawkes/main.py)0
-rw-r--r--hawkes_experiments/plot.py (renamed from hawkes/plot.py)0
-rw-r--r--hawkes_experiments/refine.py (renamed from hawkes/refine.py)0
-rw-r--r--hawkes_experiments/sanity.py (renamed from hawkes/sanity.py)0
-rw-r--r--ic_experiments/Makefile (renamed from experiments/Makefile)0
-rw-r--r--ic_experiments/README.txt (renamed from experiments/README.txt)0
-rw-r--r--ic_experiments/analyze.py (renamed from experiments/analyze.py)0
-rw-r--r--ic_experiments/build/temp.macosx-10.6-x86_64-2.7/ml.o (renamed from experiments/build/temp.macosx-10.6-x86_64-2.7/ml.o)bin326540 -> 326540 bytes
-rw-r--r--ic_experiments/build/temp.macosx-10.6-x86_64-2.7/ml2.o (renamed from experiments/build/temp.macosx-10.6-x86_64-2.7/ml2.o)bin340864 -> 340864 bytes
-rw-r--r--ic_experiments/build/temp.macosx-10.6-x86_64-2.7/ml3.o (renamed from experiments/build/temp.macosx-10.6-x86_64-2.7/ml3.o)bin275440 -> 275440 bytes
-rw-r--r--ic_experiments/build_network.py (renamed from experiments/build_network.py)0
-rw-r--r--ic_experiments/ml.c (renamed from experiments/ml.c)0
-rw-r--r--ic_experiments/ml.pyx (renamed from experiments/ml.pyx)0
-rwxr-xr-xic_experiments/ml.so (renamed from experiments/ml.so)bin125136 -> 125136 bytes
-rw-r--r--ic_experiments/ml2.c (renamed from experiments/ml2.c)0
-rw-r--r--ic_experiments/ml2.pyx (renamed from experiments/ml2.pyx)0
-rwxr-xr-xic_experiments/ml2.so (renamed from experiments/ml2.so)bin123652 -> 123652 bytes
-rw-r--r--ic_experiments/ml3.c (renamed from experiments/ml3.c)0
-rw-r--r--ic_experiments/ml3.pyx (renamed from experiments/ml3.pyx)0
-rwxr-xr-xic_experiments/ml3.so (renamed from experiments/ml3.so)bin106596 -> 106596 bytes
-rw-r--r--ic_experiments/new.py (renamed from experiments/new.py)0
-rw-r--r--ic_experiments/old_stuff/dag_dat.csv (renamed from experiments/old_stuff/dag_dat.csv)0
-rw-r--r--ic_experiments/old_stuff/distances.py (renamed from experiments/old_stuff/distances.py)0
-rw-r--r--ic_experiments/old_stuff/el.csv (renamed from experiments/old_stuff/el.csv)0
-rw-r--r--ic_experiments/old_stuff/main.py (renamed from experiments/old_stuff/main.py)0
-rw-r--r--ic_experiments/old_stuff/matplotlibrc.bak (renamed from experiments/old_stuff/matplotlibrc.bak)0
-rw-r--r--ic_experiments/old_stuff/matplotlibrc.bak2 (renamed from experiments/old_stuff/matplotlibrc.bak2)0
-rw-r--r--ic_experiments/old_stuff/matplotlibrc.bak3 (renamed from experiments/old_stuff/matplotlibrc.bak3)0
-rw-r--r--ic_experiments/old_stuff/plot.py (renamed from experiments/old_stuff/plot.py)0
-rw-r--r--ic_experiments/old_stuff/results.txt (renamed from experiments/old_stuff/results.txt)0
-rw-r--r--ic_experiments/old_stuff/results2.txt (renamed from experiments/old_stuff/results2.txt)0
-rw-r--r--ic_experiments/old_stuff/results3.txt (renamed from experiments/old_stuff/results3.txt)0
-rw-r--r--ic_experiments/old_stuff/vics.csv (renamed from experiments/old_stuff/vics.csv)0
-rw-r--r--ic_experiments/out.log (renamed from experiments/out.log)0
-rw-r--r--ic_experiments/out2.log (renamed from experiments/out2.log)0
-rw-r--r--ic_experiments/plot3d.py (renamed from experiments/plot3d.py)0
-rw-r--r--ic_experiments/process.py (renamed from experiments/process.py)0
-rw-r--r--ic_experiments/setup.py (renamed from experiments/setup.py)0
-rw-r--r--ic_experiments/setup2.py (renamed from experiments/setup2.py)0
-rw-r--r--ic_experiments/setup3.py (renamed from experiments/setup3.py)0
-rw-r--r--ic_theory/main.tex (renamed from theory/main.tex)0
-rw-r--r--supplements/background.pngbin0 -> 120272 bytes
-rw-r--r--supplements/hawkes-diagram.pngbin0 -> 99332 bytes
-rw-r--r--supplements/main.tex171
-rw-r--r--theory/warmup.tex119
66 files changed, 171 insertions, 119 deletions
diff --git a/poster/SEASLogo_CMYK_OnRed.eps b/cs284_poster/SEASLogo_CMYK_OnRed.eps
index 9abf2d9..9abf2d9 100644
--- a/poster/SEASLogo_CMYK_OnRed.eps
+++ b/cs284_poster/SEASLogo_CMYK_OnRed.eps
Binary files differ
diff --git a/poster/cascades.pdf b/cs284_poster/cascades.pdf
index fd8c3bb..fd8c3bb 100644
--- a/poster/cascades.pdf
+++ b/cs284_poster/cascades.pdf
Binary files differ
diff --git a/poster/hmcposter.cls b/cs284_poster/hmcposter.cls
index e7ce28a..e7ce28a 100644
--- a/poster/hmcposter.cls
+++ b/cs284_poster/hmcposter.cls
diff --git a/poster/hmcthesisposter.cls b/cs284_poster/hmcthesisposter.cls
index 2f44b42..2f44b42 100644
--- a/poster/hmcthesisposter.cls
+++ b/cs284_poster/hmcthesisposter.cls
diff --git a/cs284/lcc-newark.pdf b/cs284_poster/lcc-newark.pdf
index ed12e3e..ed12e3e 100644
--- a/cs284/lcc-newark.pdf
+++ b/cs284_poster/lcc-newark.pdf
Binary files differ
diff --git a/poster/mean-100-sim2.pdf b/cs284_poster/mean-100-sim2.pdf
index b8a45b7..b8a45b7 100644
--- a/poster/mean-100-sim2.pdf
+++ b/cs284_poster/mean-100-sim2.pdf
Binary files differ
diff --git a/poster/poster.tex b/cs284_poster/poster.tex
index 27f404a..27f404a 100644
--- a/poster/poster.tex
+++ b/cs284_poster/poster.tex
diff --git a/poster/yale_newlogo_yaleblue.eps b/cs284_poster/yale_newlogo_yaleblue.eps
index 8fb53b8..8fb53b8 100644
--- a/poster/yale_newlogo_yaleblue.eps
+++ b/cs284_poster/yale_newlogo_yaleblue.eps
diff --git a/cs284/cascade-size-distribution.pdf b/cs284_report/cascade-size-distribution.pdf
index 2de5ae2..2de5ae2 100644
--- a/cs284/cascade-size-distribution.pdf
+++ b/cs284_report/cascade-size-distribution.pdf
Binary files differ
diff --git a/cs284/cascades2.pdf b/cs284_report/cascades2.pdf
index ea0cdd3..ea0cdd3 100644
--- a/cs284/cascades2.pdf
+++ b/cs284_report/cascades2.pdf
Binary files differ
diff --git a/cs284/infection-dates.pdf b/cs284_report/infection-dates.pdf
index 860675c..860675c 100644
--- a/cs284/infection-dates.pdf
+++ b/cs284_report/infection-dates.pdf
Binary files differ
diff --git a/cs284/lcc-dd.pdf b/cs284_report/lcc-dd.pdf
index eb75de4..eb75de4 100644
--- a/cs284/lcc-dd.pdf
+++ b/cs284_report/lcc-dd.pdf
Binary files differ
diff --git a/poster/lcc-newark.pdf b/cs284_report/lcc-newark.pdf
index ed12e3e..ed12e3e 100644
--- a/poster/lcc-newark.pdf
+++ b/cs284_report/lcc-newark.pdf
Binary files differ
diff --git a/cs284/ll.pdf b/cs284_report/ll.pdf
index 3e36cf9..3e36cf9 100644
--- a/cs284/ll.pdf
+++ b/cs284_report/ll.pdf
Binary files differ
diff --git a/cs284/main.bib b/cs284_report/main.bib
index 98ecd8e..98ecd8e 100644
--- a/cs284/main.bib
+++ b/cs284_report/main.bib
diff --git a/cs284/main.tex b/cs284_report/main.tex
index 4bfbd25..4bfbd25 100644
--- a/cs284/main.tex
+++ b/cs284_report/main.tex
diff --git a/cs284/sim23-mean-100.pdf b/cs284_report/sim23-mean-100.pdf
index 768ac5b..768ac5b 100644
--- a/cs284/sim23-mean-100.pdf
+++ b/cs284_report/sim23-mean-100.pdf
Binary files differ
diff --git a/cs284/sim23-mean-time.pdf b/cs284_report/sim23-mean-time.pdf
index 2b8ed6b..2b8ed6b 100644
--- a/cs284/sim23-mean-time.pdf
+++ b/cs284_report/sim23-mean-time.pdf
Binary files differ
diff --git a/hawkes/README.txt b/hawkes_experiments/README.txt
index 3991d3b..3991d3b 100644
--- a/hawkes/README.txt
+++ b/hawkes_experiments/README.txt
diff --git a/hawkes/cause.py b/hawkes_experiments/cause.py
index 17ec884..17ec884 100644
--- a/hawkes/cause.py
+++ b/hawkes_experiments/cause.py
diff --git a/hawkes/data.py b/hawkes_experiments/data.py
index 0f6135b..0f6135b 100644
--- a/hawkes/data.py
+++ b/hawkes_experiments/data.py
diff --git a/hawkes/main.py b/hawkes_experiments/main.py
index 8f30dcf..8f30dcf 100644
--- a/hawkes/main.py
+++ b/hawkes_experiments/main.py
diff --git a/hawkes/plot.py b/hawkes_experiments/plot.py
index 24d3f35..24d3f35 100644
--- a/hawkes/plot.py
+++ b/hawkes_experiments/plot.py
diff --git a/hawkes/refine.py b/hawkes_experiments/refine.py
index 02bbe07..02bbe07 100644
--- a/hawkes/refine.py
+++ b/hawkes_experiments/refine.py
diff --git a/hawkes/sanity.py b/hawkes_experiments/sanity.py
index b6f25eb..b6f25eb 100644
--- a/hawkes/sanity.py
+++ b/hawkes_experiments/sanity.py
diff --git a/experiments/Makefile b/ic_experiments/Makefile
index 0fd956a..0fd956a 100644
--- a/experiments/Makefile
+++ b/ic_experiments/Makefile
diff --git a/experiments/README.txt b/ic_experiments/README.txt
index 80f6aa0..80f6aa0 100644
--- a/experiments/README.txt
+++ b/ic_experiments/README.txt
diff --git a/experiments/analyze.py b/ic_experiments/analyze.py
index 6a6896b..6a6896b 100644
--- a/experiments/analyze.py
+++ b/ic_experiments/analyze.py
diff --git a/experiments/build/temp.macosx-10.6-x86_64-2.7/ml.o b/ic_experiments/build/temp.macosx-10.6-x86_64-2.7/ml.o
index 20d0673..20d0673 100644
--- a/experiments/build/temp.macosx-10.6-x86_64-2.7/ml.o
+++ b/ic_experiments/build/temp.macosx-10.6-x86_64-2.7/ml.o
Binary files differ
diff --git a/experiments/build/temp.macosx-10.6-x86_64-2.7/ml2.o b/ic_experiments/build/temp.macosx-10.6-x86_64-2.7/ml2.o
index 285f8be..285f8be 100644
--- a/experiments/build/temp.macosx-10.6-x86_64-2.7/ml2.o
+++ b/ic_experiments/build/temp.macosx-10.6-x86_64-2.7/ml2.o
Binary files differ
diff --git a/experiments/build/temp.macosx-10.6-x86_64-2.7/ml3.o b/ic_experiments/build/temp.macosx-10.6-x86_64-2.7/ml3.o
index 9a4f66b..9a4f66b 100644
--- a/experiments/build/temp.macosx-10.6-x86_64-2.7/ml3.o
+++ b/ic_experiments/build/temp.macosx-10.6-x86_64-2.7/ml3.o
Binary files differ
diff --git a/experiments/build_network.py b/ic_experiments/build_network.py
index c58d5cf..c58d5cf 100644
--- a/experiments/build_network.py
+++ b/ic_experiments/build_network.py
diff --git a/experiments/ml.c b/ic_experiments/ml.c
index 25c10ac..25c10ac 100644
--- a/experiments/ml.c
+++ b/ic_experiments/ml.c
diff --git a/experiments/ml.pyx b/ic_experiments/ml.pyx
index e1bf26b..e1bf26b 100644
--- a/experiments/ml.pyx
+++ b/ic_experiments/ml.pyx
diff --git a/experiments/ml.so b/ic_experiments/ml.so
index 73b6dbd..73b6dbd 100755
--- a/experiments/ml.so
+++ b/ic_experiments/ml.so
Binary files differ
diff --git a/experiments/ml2.c b/ic_experiments/ml2.c
index a61a0d3..a61a0d3 100644
--- a/experiments/ml2.c
+++ b/ic_experiments/ml2.c
diff --git a/experiments/ml2.pyx b/ic_experiments/ml2.pyx
index 1458683..1458683 100644
--- a/experiments/ml2.pyx
+++ b/ic_experiments/ml2.pyx
diff --git a/experiments/ml2.so b/ic_experiments/ml2.so
index 37ff3ea..37ff3ea 100755
--- a/experiments/ml2.so
+++ b/ic_experiments/ml2.so
Binary files differ
diff --git a/experiments/ml3.c b/ic_experiments/ml3.c
index 7ad3edb..7ad3edb 100644
--- a/experiments/ml3.c
+++ b/ic_experiments/ml3.c
diff --git a/experiments/ml3.pyx b/ic_experiments/ml3.pyx
index 6e031ef..6e031ef 100644
--- a/experiments/ml3.pyx
+++ b/ic_experiments/ml3.pyx
diff --git a/experiments/ml3.so b/ic_experiments/ml3.so
index fb8afc9..fb8afc9 100755
--- a/experiments/ml3.so
+++ b/ic_experiments/ml3.so
Binary files differ
diff --git a/experiments/new.py b/ic_experiments/new.py
index 4274dd7..4274dd7 100644
--- a/experiments/new.py
+++ b/ic_experiments/new.py
diff --git a/experiments/old_stuff/dag_dat.csv b/ic_experiments/old_stuff/dag_dat.csv
index 5e880fa..5e880fa 100644
--- a/experiments/old_stuff/dag_dat.csv
+++ b/ic_experiments/old_stuff/dag_dat.csv
diff --git a/experiments/old_stuff/distances.py b/ic_experiments/old_stuff/distances.py
index 1834d36..1834d36 100644
--- a/experiments/old_stuff/distances.py
+++ b/ic_experiments/old_stuff/distances.py
diff --git a/experiments/old_stuff/el.csv b/ic_experiments/old_stuff/el.csv
index d8bf6fb..d8bf6fb 100644
--- a/experiments/old_stuff/el.csv
+++ b/ic_experiments/old_stuff/el.csv
diff --git a/experiments/old_stuff/main.py b/ic_experiments/old_stuff/main.py
index 7556dac..7556dac 100644
--- a/experiments/old_stuff/main.py
+++ b/ic_experiments/old_stuff/main.py
diff --git a/experiments/old_stuff/matplotlibrc.bak b/ic_experiments/old_stuff/matplotlibrc.bak
index 33d6f10..33d6f10 100644
--- a/experiments/old_stuff/matplotlibrc.bak
+++ b/ic_experiments/old_stuff/matplotlibrc.bak
diff --git a/experiments/old_stuff/matplotlibrc.bak2 b/ic_experiments/old_stuff/matplotlibrc.bak2
index 07cd7c6..07cd7c6 100644
--- a/experiments/old_stuff/matplotlibrc.bak2
+++ b/ic_experiments/old_stuff/matplotlibrc.bak2
diff --git a/experiments/old_stuff/matplotlibrc.bak3 b/ic_experiments/old_stuff/matplotlibrc.bak3
index 184a4c1..184a4c1 100644
--- a/experiments/old_stuff/matplotlibrc.bak3
+++ b/ic_experiments/old_stuff/matplotlibrc.bak3
diff --git a/experiments/old_stuff/plot.py b/ic_experiments/old_stuff/plot.py
index cbea485..cbea485 100644
--- a/experiments/old_stuff/plot.py
+++ b/ic_experiments/old_stuff/plot.py
diff --git a/experiments/old_stuff/results.txt b/ic_experiments/old_stuff/results.txt
index 4a8f5cd..4a8f5cd 100644
--- a/experiments/old_stuff/results.txt
+++ b/ic_experiments/old_stuff/results.txt
diff --git a/experiments/old_stuff/results2.txt b/ic_experiments/old_stuff/results2.txt
index 857cc6b..857cc6b 100644
--- a/experiments/old_stuff/results2.txt
+++ b/ic_experiments/old_stuff/results2.txt
diff --git a/experiments/old_stuff/results3.txt b/ic_experiments/old_stuff/results3.txt
index 19db78a..19db78a 100644
--- a/experiments/old_stuff/results3.txt
+++ b/ic_experiments/old_stuff/results3.txt
diff --git a/experiments/old_stuff/vics.csv b/ic_experiments/old_stuff/vics.csv
index 219eb7a..219eb7a 100644
--- a/experiments/old_stuff/vics.csv
+++ b/ic_experiments/old_stuff/vics.csv
diff --git a/experiments/out.log b/ic_experiments/out.log
index 55df723..55df723 100644
--- a/experiments/out.log
+++ b/ic_experiments/out.log
diff --git a/experiments/out2.log b/ic_experiments/out2.log
index dd992a6..dd992a6 100644
--- a/experiments/out2.log
+++ b/ic_experiments/out2.log
diff --git a/experiments/plot3d.py b/ic_experiments/plot3d.py
index b1b337f..b1b337f 100644
--- a/experiments/plot3d.py
+++ b/ic_experiments/plot3d.py
diff --git a/experiments/process.py b/ic_experiments/process.py
index f339fd1..f339fd1 100644
--- a/experiments/process.py
+++ b/ic_experiments/process.py
diff --git a/experiments/setup.py b/ic_experiments/setup.py
index 49667b7..49667b7 100644
--- a/experiments/setup.py
+++ b/ic_experiments/setup.py
diff --git a/experiments/setup2.py b/ic_experiments/setup2.py
index 3c1a5a2..3c1a5a2 100644
--- a/experiments/setup2.py
+++ b/ic_experiments/setup2.py
diff --git a/experiments/setup3.py b/ic_experiments/setup3.py
index f89759b..f89759b 100644
--- a/experiments/setup3.py
+++ b/ic_experiments/setup3.py
diff --git a/theory/main.tex b/ic_theory/main.tex
index eb59c6e..eb59c6e 100644
--- a/theory/main.tex
+++ b/ic_theory/main.tex
diff --git a/supplements/background.png b/supplements/background.png
new file mode 100644
index 0000000..79c3895
--- /dev/null
+++ b/supplements/background.png
Binary files differ
diff --git a/supplements/hawkes-diagram.png b/supplements/hawkes-diagram.png
new file mode 100644
index 0000000..c592a8d
--- /dev/null
+++ b/supplements/hawkes-diagram.png
Binary files differ
diff --git a/supplements/main.tex b/supplements/main.tex
new file mode 100644
index 0000000..10e1a52
--- /dev/null
+++ b/supplements/main.tex
@@ -0,0 +1,171 @@
+\documentclass{article}
+\usepackage[utf8]{inputenc}
+\usepackage{amsmath}
+\usepackage{algorithm}% http://ctan.org/pkg/algorithms
+\usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx
+\usepackage{graphicx}
+\DeclareMathOperator*{\argmax}{argmax}
+\providecommand{\e}[1]{\ensuremath{\times 10^{#1}}}
+
+\title{Hawkes contagion model}
+\author{Ben Green \and Thibaut Horel \and Andrew Papachristos}
+\date{September 2015}
+
+\begin{document}
+
+\maketitle
+
+\section{Hawkes contagion model}
+We model the contagion of violence using a multidimensional Hawkes process over the co-offending network.
+
+\subsection{Background}
+We first develop the theory and notation behind the Hawkes process as it is traditionally presented.
+
+The Hawkes process models the instantaneous propensity to become infected at time $t$ based on both exogenous and endogenous factors: a background rate $\mu$ that captures infections unrelated to social interactions and a peer contagion component that considers the social influence of previous infections. The instantaneous infection rate $\lambda(t)$ (also known as the ``hazard function" and ``conditional intensity function") is typically defined as follows:
+\begin{equation}
+\lambda(t) = \mu + \alpha\sum_{t_i < t}e^{-\beta(t-t_i)}
+\end{equation}
+
+More generally, the Hawkes process can be written as
+\begin{equation}\label{eq:rate}
+\lambda(t) = \mu + \sum_{t_u < t_v}p(u,v)
+\end{equation}
+where in the typical case $p(u,v)=\alpha e^{-\beta(t_v-t_u)}$.
+
+Based on the instantaneous infection rate $\lambda(t)$ we can define the probability of certain events. Doing so relies on the following functions:
+\begin{itemize}
+\item Conditional density function $f$: the probability that an infection will occur at a given time.
+\item Cumulative distribution function $F$: the probability that an infection will occur before the current time $t$.
+\item Survival function $S$: the probability that an infection will not have occurred before the current time $t$. This implies that $S = 1 - F$.
+\end{itemize}
+
+We can define the probability of infection at a given time $t$ as the instantaneous infection rate at $t$ multiplied by the probability that the item survived uninfected up until $t$.
+\begin{equation}
+f(t) = \lambda(t) S(t)
+\end{equation}
+
+The survival function is given by
+\begin{equation}
+S(t) = \exp\left(-\int_{t_{last}}^t \lambda(s) ds\right)
+\end{equation}
+where $t_{last}$ is the time of the most recent infection before $t$.
+
+Now we can define
+\begin{equation}
+f(t) = \lambda(t) \exp\left(-\int_{t_{last}}^t \lambda(s) ds\right)
+\end{equation}
+
+The likelihood is given by the density function for each observed infection and the survival function for all times without an infection. For a Hawkes process over the period $[0,T]$ with $n$ infections, the likelihood is defined as
+\begin{equation}
+L = \left[ f(t_1) \ldots f(t_n) \right] S(T) = \left[\prod_{i=1}^{n} \lambda(t_i) \right] \exp\left(-\int_{0}^{T} \lambda(s) ds \right)
+\end{equation}
+
+\subsection{Our model}
+We extend the single-dimensional Hawkes process to a multi-dimensional variant that can properly describe the contagion process over our network. We utilize a multidimensional approach where each network vertex (i.e. each individual) occupies its own dimension. This allows us to specify the unique set of social influences that each person encounters vis-a-vis his or her pattern of co-offending ties.
+
+\subsubsection{Infection rate}
+We define an instantaneous infection rate that is a variant of the traditional one presented in Equation~\ref{eq:rate}. In particular, we define a unique infection rate for each network vertex $v$.
+\begin{equation}
+\lambda_v(t) = \underbrace{\mu(t)}_\text{background} + \underbrace{\sum_{u \in V} \Lambda_{uv}(t)}_\text{peer infection}
+\end{equation}
+
+The background rate $\mu(t)$ captures the seasonal rates of violence observed in the data. Given the regularity with which broad rates of violence fluctuate, we assume this process occurs exogenously and is not solely driven by peer contagion. We fit a time-varying function to the data, as described in Section SX.X).
+
+The infection intensity function $\Lambda_{uv}(t)$ models the effect of person $u$ on person $v$ at time $t$. It is based on two common assumptions regarding the spread of contagions.
+\begin{enumerate}
+\item Time: Consistent with previous models used to infer the spread of contagions over social networks (4, 5), we assume that the impact of earlier infections on future events decays as the time passed since the original infection increases. Additionally, influence can only travel forward in time: an infection has no impact on those that came before it. We assume that influence decays over time based on the distribution $p_t(u,v)=e^{-\beta(t_v-t_u)}$.
+\item Network Structure: Epidemiologists commonly assume that contagious events are localized and that the transmission probability increases closer to the source (CITE). In our case, we assume that violence is more likely to spread between people who are more closely linked in the network and measure the distance between individuals based on network topology. Based on previous studies of violence in social networks, we assume that infections are able to occur across a distance of up to three degrees (6); people who are further away in the network have no effect on one another. We assume that influence decays over the network based on the distribution $p_s(u,v)=e^{-\alpha \cdot \text{dist}(u,v)}$.
+\end{enumerate}
+
+Combining these two components, we
+\begin{equation}
+\Lambda_{uv}(t) = p_s(u,v) p_t(u,v)= \frac{\alpha}{\text{dist}(u,v)} e^{-\beta(t_v-t_u)}
+\end{equation}
+
+\subsubsection{Likelihood}
+With our infection rate fully-defined, we can now formulate the likelihood function
+
+\begin{figure}
+\centering
+\includegraphics{hawkes-diagram}
+\caption{Caption}
+\label{fig:hawkes-diagram}
+\end{figure}
+
+\subsection{Finding the background rate}
+Because the seasonal variations in gunshot rates (Figure SX) remain consistent throughout the study period, we assume these are inherent to the infection process and not purely driven by noise or social contagion. Instead of having a constant background rate, we capture seasonal variations as a periodic sinusoidal function. We first compute the aggregate background rate of all the nodes, based on the number of infections each day.
+
+\begin{equation}
+M(t) = \mu_0 + A \sin(\omega t + \phi)
+\end{equation}
+
+Because we are modeling annual fluctuations, we know that the period is one year, i.e. $\omega=2\pi/365.24$. We learn the other three parameters using non-linear least squares estimates with the Gauss-Newton algorithm. This yields
+
+\begin{equation}
+M(t) = 3.78 + 1.63 \sin(\frac{2\pi}{365.24} t + 4.36)
+\end{equation}
+
+\begin{figure}
+\centering
+\includegraphics{background}
+\caption{Caption}
+\label{fig:background}
+\end{figure}
+
+Because we do not know \emph{a priori} which infections are due to the background rate versus peer contagion,
+can use the rate of fluctuations but not the scale
+we cannot use the base rate and amplitude found.
+[set variable for the value, assume linear relationship between base and fluctuations]
+$A = a\mu_0$
+
+\begin{align}
+M(t) &= \mu_0' + 0.43 \mu_0 \sin\left(\frac{2\pi}{365.24} t + 4.36\right) \\
+ &= \mu_0' \left[1 + 0.43 \sin\left(\frac{2\pi}{365.24} t + 4.36\right) \right]
+\end{align}
+
+
+Finally, we convert the aggregate background rate $M(t)$ to an individual background rate $\mu(t)$ for each person. To do this, note that the aggregate number of shootings in a given day is the sum of each person's instantaneous rate over the course of that day, i.e.
+\begin{align}
+M(t) &= \sum_{v} \int_{t-1}^{t} \mu(t') dt' \\
+ &= |V| \int_{t-1}^{t} \mu(t') dt'
+\end{align}
+
+To simplify this calculation, we assume that the individual background rate for each person is constant over the course of a day, i.e. $\int_{t-1}^{t} \mu(t') dt' = \mu(t)$.
+[explain why this doesn't really affect results]
+This yields the result
+
+\begin{align}
+\mu(t) &= \frac{M(t)}{|V|} \\
+ &= \frac{\mu_0'}{|V|} \left[1 + 0.43 \sin\left(\frac{2\pi}{365.24} t + 4.36\right) \right] \\
+ &= \mu_0 \left[1 + 0.43 \sin\left(\frac{2\pi}{365.24} t + 4.36\right) \right]
+\end{align}
+where $\mu_0=\mu_0'/|V|$.
+
+\subsection{Learning the parameters [THIBAUT FILL IN THIS SECTION]}
+We learn parameters using
+
+$\mu_0 = 1.1845e-05$, $\alpha = 0.00317$, and $\beta = 0.0039$.
+
+\begin{equation}
+\lambda_v(t) = 1.1845\e{-5} \left[1 + 0.43 \sin\left(\frac{2\pi}{365.24} t + 4.36\right) \right] + \sum_{u \in V} \frac{0.00317}{\text{dist}(u,v)} 0.0039 e^{-0.0039(t-t_u)}
+\end{equation}
+
+\subsection{Cascade recovery}
+We can estimate if a person was primarily infected via peer contagion by comparing the contributions from the background rate and from his or her peers.
+
+\subsection{Experiments with synthetic data}
+
+\subsubsection{Generating networks}
+Given that we do not know the true pattern of infection propagation in criminal networks, we first verify that our methods can accurately infer cascades in cases where we do have ground truth data. To test our methods, we generated a series of cascades on social networks. We then had our model determine optimal parameters and use these to guess how each infection spread. We show that our model is able to accurately determine the contagion’s parameters and to identify the path that infections took through social networks.
+
+We first generated network structures using the forest fire model (CITE), which is known to capture the degree distribution and community structure observed in empirical social networks. We generated networks with 10,000 nodes and burning probabilities $p=r=0.3$.
+
+We also simulated contagions on the co-offending network. Since we are most interested in ultimately understanding the diffusion process of violence on the co-offending network, it is important to first test our cascade inference algorithm here and ensure that we are able to accurately recover cascades. We removed all victim and demographic information, leaving just the network structure, and generated contagions. As shown below, we are able to accurately infer the process by which cascades spread on this network.
+
+\subsubsection{Simulating contagions}
+
+\subsubsection{Results}
+
+\section{Regarding causality [THIBAUT WRITE THIS SECTION]}
+
+\end{document}
diff --git a/theory/warmup.tex b/theory/warmup.tex
deleted file mode 100644
index c34eb89..0000000
--- a/theory/warmup.tex
+++ /dev/null
@@ -1,119 +0,0 @@
-\documentclass[10pt]{article}
-\usepackage[utf8x]{inputenc}
-\usepackage{amsmath,amsfonts,amsthm}
-\usepackage[english]{babel}
-\usepackage[capitalize, noabbrev]{cleveref}
-\usepackage{algorithm}
-\usepackage{algpseudocode}
-
-\newenvironment{enumerate*}%
- {\vspace{-2ex} \begin{enumerate} %
- \setlength{\itemsep}{-1ex} \setlength{\parsep}{0pt}}%
- {\end{enumerate}}
-
-\newenvironment{itemize*}%
- {\vspace{-2ex} \begin{itemize} %
- \setlength{\itemsep}{-1ex} \setlength{\parsep}{0pt}}%
- {\end{itemize}}
-
-\newenvironment{description*}%
- {\vspace{-2ex} \begin{description} %
- \setlength{\itemsep}{-1ex} \setlength{\parsep}{0pt}}%
- {\end{description}}
-
-\DeclareMathOperator{\E}{\mathbb{E}}
-\let\P\relax
-\DeclareMathOperator{\P}{\mathbb{P}}
-\newcommand{\ex}[1]{\E\left[#1\right]}
-\newcommand{\prob}[1]{\P\left[#1\right]}
-\newcommand{\inprod}[1]{\left\langle #1 \right\rangle}
-\newcommand{\R}{\mathbf{R}}
-\newcommand{\N}{\mathbf{N}}
-\newcommand{\C}{\mathcal{C}}
-\newcommand{\eps}{\varepsilon}
-\newcommand{\eqdef}{\mathbin{\stackrel{\rm def}{=}}}
-\newcommand{\llbracket}{[\![}
-
-\newtheorem{theorem}{Theorem}
-\newtheorem{lemma}{Lemma}
-\algrenewcommand\algorithmicensure{\textbf{Output:}}
-\algrenewcommand\algorithmicrequire{\textbf{Input:}}
-\DeclareMathOperator*{\argmax}{arg\,max}
-
-\author{}
-\title{}
-\date{}
-
-\begin{document}
-
-\paragraph{Notations}
-\begin{itemize}
- \item $n$ criminals, $V = \{1,\dots,n\}$
- \item $\alpha_{i,j}$ influence of criminal $i$ on criminal $j$.
- \item the infections form a set of pairs $C = \{(t_i, v_i),\; 1\leq i\leq m\}$
- where $t_i$ is the time and $v_i\in\{1,\dots, n\}$ is the identifier of
- the criminal.
-\end{itemize}
-
-\paragraph{Model}
-The infections are modeled as a multivariate Hawkes process. The instantaneous rate
-of infection of user $j$ at time $t$ is given by:
-\begin{displaymath}
- \lambda_j(t) = \lambda(t) + \sum_{t_i<t}\alpha_{v_i, j}
- \phi(t-t_i)
-\end{displaymath}
-
-\emph{Technical concern:} stability of the process, there is a condition on the
-$\alpha_{i,j}$ parameters so that the process is stable, i.e does not keep
-accelerating forever. We probably do not need to worry about it too much:
-empirically the process is stable.
-
-\paragraph{Time kernel}
-we choose an exponential kernel for $\phi$ (will allow the recursive trick
-later on) $ \phi(t) = \mu e^{-\mu t} $
-
-\paragraph{Base rate} $\lambda(t)$ captures the seasonal effect. TBD, worst
-case is to choose a constant approximation, $\lambda(t) = \lambda_0$. We
-define $\Lambda(T) \eqdef \int_{0}^T \lambda(t)dt$.
-
-\paragraph{Edge model} TBD
-
-\paragraph{Likelihood} The log-likelihood for observation horizon $T$ is given
-by:
-\begin{displaymath}
- \mathcal{L}(C) = \sum_{i=1}^m \log \lambda_{v_i}(t_i)
- - \sum_{j=1}^n\int_{0}^T \lambda_j(t)dt
-\end{displaymath}
-Note that we have:
-\begin{displaymath}
- \int_{0}^T \lambda_j(t)dt = \int_{0}^T\lambda(t)dt + \sum_{i=1}^m
- \alpha_{v_i, j}\big[1-e^{-\mu(T-t_i)}\big]
-\end{displaymath}
-
-Hence the log-likelihood can be rewritten (after reordering a little bit):
-\begin{displaymath}
- \mathcal{L}(C) = \sum_{i=1}^m\log \lambda_{v_i}(t_i)
- - \sum_{i=1}^m A_{v_i} \big[1-e^{-\mu(T-t_i)}\big]
- - n\Lambda(T)
-\end{displaymath}
-where $A_{v_i} = \sum_{j=1}^n \alpha_{v_i, j}$ (out-weight of criminal $v_i$),
-or in complete form:
-\begin{displaymath}
- \mathcal{L}(C) = \sum_{i=1}^m\log\left[ \lambda(t_i)
- + \sum_{j=1}^{i-1}\alpha_{v_j, v_i}\mu e^{-\mu(t_i-t_j)}\right]
- - \sum_{i=1}^m A_{v_i} \big[1-e^{-\mu(T-t_i)}\big]
- - n\Lambda(T)
-\end{displaymath}
-
-\paragraph{Computational trick} As written above, the log-likelihood can be
-computed in time $O(m^2 + n^2)$. This is not linear in the input size, which is
-$O(m + n^2)$. The $O(m^2)$ term comes from the first sum in the definition of
-the log-likelihood. However, in the case of an exponential time kernel, using
-a recursive trick, the complexity of this term can be reduced to $O(mn)$ for an
-overall running time of $O(mn + n^2)$.
-
-\emph{Question:} Is it worth it in our case? Yes if the number of victims
-is significantly smaller than the number of infections. Is it the case?
-
-
-\end{document}