Skip to content

Commit

Permalink
cross-chain warmup
Browse files Browse the repository at this point in the history
  • Loading branch information
yiz committed Feb 24, 2020
1 parent 2f477c5 commit 3958ee7
Show file tree
Hide file tree
Showing 82 changed files with 88,532 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "stan"]
path = stan
url = https://github.com/stan-dev/stan
branch = mpi_warmup_v2
2,059 changes: 2,059 additions & 0 deletions examples/arK-arK/0.output.csv

Large diffs are not rendered by default.

2,059 changes: 2,059 additions & 0 deletions examples/arK-arK/1.output.csv

Large diffs are not rendered by default.

2,059 changes: 2,059 additions & 0 deletions examples/arK-arK/2.output.csv

Large diffs are not rendered by default.

2,059 changes: 2,059 additions & 0 deletions examples/arK-arK/3.output.csv

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions examples/arK-arK/arK-arK.data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
K <- 5

T <- 200

y <- c(
0.7293852753, 0.8297635923, 0.7839527091, 1.0259589105, 0.9696824412,
1.0828859218, 0.7063891465, 0.7769243971, 0.4618029476, 0.6385997565,
0.3742344429, 0.0854966416, -0.1260149233, -0.2934151326, -0.2617308802,
-0.3359221372, -0.5019895766, -0.6417399532, -0.6224629523, -0.8508997238,
-0.8678351807, -1.0163853144, -1.0558901454, -0.9694812319, -1.0672519169,
-0.8430989055, -0.6827006149, -0.4446573489, -0.5920387090, -0.5105689815,
-0.4178858435, -0.1736168751, -0.1072500940, -0.0355025516, 0.3432168459,
0.3841903414, 0.4960876950, 0.7084511605, 0.5962806615, 0.6414424152,
0.6513222735, 0.5942153484, 0.7779414176, 0.7307762325, 0.4822472694,
0.5320372234, 0.4851022175, 0.3685521219, 0.3533268113, 0.1633690002,
0.2530389410, 0.0006621430, -0.0157674958, -0.0144909054, -0.0252628993,
-0.0056256128, -0.3189177332, -0.0227791612, -0.0716865707, -0.1850182514,
-0.2350075682, -0.1243111880, -0.1304923565, -0.1994777726, 0.0775739320,
-0.1628522111, 0.0234645663, -0.0646807914, 0.0845324981, 0.0550150773,
0.1417424074, 0.0876638222, -0.0528467198, 0.0695217092, -0.1014499970,
-0.0688806547, -0.2512073227, -0.3902872828, -0.1676283611, -0.2791635517,
-0.3121253506, -0.2865502547, -0.4117701622, -0.4982098458, -0.5028522787,
-0.7394004480, -0.2492280924, -0.4710158859, -0.4645727076, -0.4457058117,
-0.2844237121, -0.0227786998, -0.0605507196, 0.0662256249, 0.1405232927,
0.2763394882, 0.3772233671, 0.6103044598, 0.8808694697, 0.7885174270,
0.8013632395, 0.6609678195, 0.8097669196, 0.8205077274, 0.9807562966,
0.7240388847, 0.9318587166, 0.8504881551, 0.4805918638, 0.5085811342,
0.4161126092, 0.3146685518, -0.0281539189, -0.0717016521, -0.1439206592,
-0.5223661051, -0.4033621109, -0.6886329349, -0.6947170572, -0.6496557077,
-0.9926992981, -0.9354098817, -0.8969864546, -0.9781523572, -1.0668406080,
-0.9535621424, -0.7570773682, -0.8425755431, -0.6977697431, -0.3165581858,
-0.3878217300, -0.0671166462, -0.0385154999, 0.0895646813, 0.1454578935,
0.1852131654, 0.3956127617, 0.6852644284, 0.5563107812, 0.7108445288,
0.7462804690, 0.6684519285, 0.6936535333, 0.7379992741, 0.6627708128,
0.6900939802, 0.6807304694, 0.3733191989, 0.4536740601, 0.3137682260,
0.4500334320, -0.0337947734, 0.0047340737, -0.0856874439, 0.1082543270,
-0.1398269720, -0.0429735449, -0.4541637356, -0.3326428149, -0.2333534103,
-0.2014612607, -0.1826792426, -0.2278848137, -0.0415383584, -0.1210077677,
-0.0724354048, -0.0482025571, 0.1580149098, 0.0583926960, -0.1117559432,
-0.0381725259, 0.1789819529, -0.0148415779, 0.0500966207, -0.1980592117,
-0.1400114013, -0.1746734639, -0.1767850853, -0.2154143864, -0.4144745850,
-0.3405434088, -0.4482790416, -0.6571159536, -0.3546433053, -0.5257081174,
-0.6564372310, -0.5245263017, -0.4758655851, -0.3631316786, -0.3366915389,
-0.3254437415, 0.0006694692, 0.2080422414, 0.0023164951, 0.1124752107,
0.3494037146, 0.4717023945, 0.5906600432, 0.6048634064, 0.9331979099)

27 changes: 27 additions & 0 deletions examples/arK-arK/arK-arK.stan
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
data {
int<lower=0> K;
int<lower=0> T;
real y[T];
}

parameters {
real alpha;
real beta[K];
real<lower=0> sigma;
}

model {
alpha ~ normal(0, 10);
beta ~ normal(0, 10);
sigma ~ cauchy(0, 2.5);

for (t in (K+1):T) {
real mu;
mu = alpha;

for (k in 1:K)
mu = mu + beta[k] * y[t - k];

y[t] ~ normal(mu, sigma);
}
}
1,509 changes: 1,509 additions & 0 deletions examples/arK-arK/mpi.0.output.csv

Large diffs are not rendered by default.

1,509 changes: 1,509 additions & 0 deletions examples/arK-arK/mpi.1.output.csv

Large diffs are not rendered by default.

1,509 changes: 1,509 additions & 0 deletions examples/arK-arK/mpi.2.output.csv

Large diffs are not rendered by default.

1,509 changes: 1,509 additions & 0 deletions examples/arK-arK/mpi.3.output.csv

Large diffs are not rendered by default.

2,059 changes: 2,059 additions & 0 deletions examples/arK/0.output.csv

Large diffs are not rendered by default.

2,059 changes: 2,059 additions & 0 deletions examples/arK/1.output.csv

Large diffs are not rendered by default.

2,059 changes: 2,059 additions & 0 deletions examples/arK/2.output.csv

Large diffs are not rendered by default.

2,059 changes: 2,059 additions & 0 deletions examples/arK/3.output.csv

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions examples/arK/arK.data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
K <- 5

T <- 200

y <- c(
0.7293852753, 0.8297635923, 0.7839527091, 1.0259589105, 0.9696824412,
1.0828859218, 0.7063891465, 0.7769243971, 0.4618029476, 0.6385997565,
0.3742344429, 0.0854966416, -0.1260149233, -0.2934151326, -0.2617308802,
-0.3359221372, -0.5019895766, -0.6417399532, -0.6224629523, -0.8508997238,
-0.8678351807, -1.0163853144, -1.0558901454, -0.9694812319, -1.0672519169,
-0.8430989055, -0.6827006149, -0.4446573489, -0.5920387090, -0.5105689815,
-0.4178858435, -0.1736168751, -0.1072500940, -0.0355025516, 0.3432168459,
0.3841903414, 0.4960876950, 0.7084511605, 0.5962806615, 0.6414424152,
0.6513222735, 0.5942153484, 0.7779414176, 0.7307762325, 0.4822472694,
0.5320372234, 0.4851022175, 0.3685521219, 0.3533268113, 0.1633690002,
0.2530389410, 0.0006621430, -0.0157674958, -0.0144909054, -0.0252628993,
-0.0056256128, -0.3189177332, -0.0227791612, -0.0716865707, -0.1850182514,
-0.2350075682, -0.1243111880, -0.1304923565, -0.1994777726, 0.0775739320,
-0.1628522111, 0.0234645663, -0.0646807914, 0.0845324981, 0.0550150773,
0.1417424074, 0.0876638222, -0.0528467198, 0.0695217092, -0.1014499970,
-0.0688806547, -0.2512073227, -0.3902872828, -0.1676283611, -0.2791635517,
-0.3121253506, -0.2865502547, -0.4117701622, -0.4982098458, -0.5028522787,
-0.7394004480, -0.2492280924, -0.4710158859, -0.4645727076, -0.4457058117,
-0.2844237121, -0.0227786998, -0.0605507196, 0.0662256249, 0.1405232927,
0.2763394882, 0.3772233671, 0.6103044598, 0.8808694697, 0.7885174270,
0.8013632395, 0.6609678195, 0.8097669196, 0.8205077274, 0.9807562966,
0.7240388847, 0.9318587166, 0.8504881551, 0.4805918638, 0.5085811342,
0.4161126092, 0.3146685518, -0.0281539189, -0.0717016521, -0.1439206592,
-0.5223661051, -0.4033621109, -0.6886329349, -0.6947170572, -0.6496557077,
-0.9926992981, -0.9354098817, -0.8969864546, -0.9781523572, -1.0668406080,
-0.9535621424, -0.7570773682, -0.8425755431, -0.6977697431, -0.3165581858,
-0.3878217300, -0.0671166462, -0.0385154999, 0.0895646813, 0.1454578935,
0.1852131654, 0.3956127617, 0.6852644284, 0.5563107812, 0.7108445288,
0.7462804690, 0.6684519285, 0.6936535333, 0.7379992741, 0.6627708128,
0.6900939802, 0.6807304694, 0.3733191989, 0.4536740601, 0.3137682260,
0.4500334320, -0.0337947734, 0.0047340737, -0.0856874439, 0.1082543270,
-0.1398269720, -0.0429735449, -0.4541637356, -0.3326428149, -0.2333534103,
-0.2014612607, -0.1826792426, -0.2278848137, -0.0415383584, -0.1210077677,
-0.0724354048, -0.0482025571, 0.1580149098, 0.0583926960, -0.1117559432,
-0.0381725259, 0.1789819529, -0.0148415779, 0.0500966207, -0.1980592117,
-0.1400114013, -0.1746734639, -0.1767850853, -0.2154143864, -0.4144745850,
-0.3405434088, -0.4482790416, -0.6571159536, -0.3546433053, -0.5257081174,
-0.6564372310, -0.5245263017, -0.4758655851, -0.3631316786, -0.3366915389,
-0.3254437415, 0.0006694692, 0.2080422414, 0.0023164951, 0.1124752107,
0.3494037146, 0.4717023945, 0.5906600432, 0.6048634064, 0.9331979099)

27 changes: 27 additions & 0 deletions examples/arK/arK.stan
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
data {
int<lower=0> K;
int<lower=0> T;
real y[T];
}

parameters {
real alpha;
real beta[K];
real<lower=0> sigma;
}

model {
alpha ~ normal(0, 10);
beta ~ normal(0, 10);
sigma ~ cauchy(0, 2.5);

for (t in (K+1):T) {
real mu;
mu = alpha;

for (k in 1:K)
mu = mu + beta[k] * y[t - k];

y[t] ~ normal(mu, sigma);
}
}
Loading

0 comments on commit 3958ee7

Please sign in to comment.