-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsampler.tex
63 lines (52 loc) · 2.28 KB
/
sampler.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
\documentclass{article}
\usepackage{times}
\usepackage{mathptmx}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage{hyperref}
\title{The Sampler Is Part of the Process}
\author{Andrew J.\ Dolgert}
\date{5 July 2015}
\begin{document}
\maketitle
I'm writing code to sample a Markov Renewal Process
which is specified as competing processes. These competing
processes, are long-lived, meaning they aren't redefined
each time something fires. This is a more general
of chemical kinetics sampled with Gillespie's method.
My goal is a safe and efficient expression of a
discrete space, continuous-time stochastic model using
this long-lived competing process. In order to understand
this calculation, and in order to write the code,
I want to separate the process from sampling, likelihood
calculation, and other measurements of the process.
A process is all $X_n$ and $T_n$, along with the
probabilities for those $X_n$ and $T_n$ given the previous
states and times, $X_{n-1}$ and $T_{n-1}$.
For calculation, we would hope to separate two things,
the specification of the process, which is the likelihood
of any $X_{n+1}$ and $T_{n+1}$ given $X_n$ and $T_n$,
from the actual states and times themselves.
We could think of the process specification as an
operator which, given current states and times,
assigns likelihoods to new states and times.
Instead, we define a process as both the operator
and the current state.
A First Reaction method sampler will, at every time
step, ask which transitions are enabled and sample
from those transitions, accounting for rescaling
transitions which haven't fired yet but may still fire.
\section{Next Reaction Method}
We need a monotone priority queue which supports
deletion and update. It's a priority queue because we want the
next reaction, in time, to fire. It's monotone because
once we choose a reaction, all other reactions will be later.
We need deletion and update because an enabled transition
can be re-enabled with a new firing time or deleted to
remove the transition.
A Fibonacci Heap would work. In practice, it would a Pairing Heap
is simpler to implement and has a lower factor on its complexity.
We can make it an option to use either. Neither is monotone,
so there may be some advancement to make by finding a monotone
priority queue.
\end{document}