-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME
30 lines (22 loc) · 756 Bytes
/
README
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
This program implements a MCMC algorithm for the following hierarchical
model:
y_k ~ Poisson(n_k * theta_k)
theta_k ~ Gamma(a, b)
a ~ Unif(0, a0)
b ~ Unif(0, b0)
I let a0 and b0 be arbitrarily large.
Arguments:
1) input file name
With two space delimited columns holding integer values for
y and float values for n.
2) number of trials (1000 by default)
Output: A comma delimited file containing a column for a, b, and each
theta. All output is written to standard out.
Example:
$ head -3 mydata.txt
4 0.91643
23 3.23709
7 0.40103
$ a.out mydata.txt 2500 > output.csv
This code borrows from the nVidia developer zone documentation,
specifically http://docs.nvidia.com/cuda/curand/index.html#topic_1_2_1