--- Generating Stan code ---
functions {
// https://github.com/stan-dev/stan/issues/452
real to_real(real x) { return x; }
}
data {
vector[10] x_stan_0_5;
vector[10] x_stan_0_6;
}
parameters {
real x_stan_0_0;
vector[20] x_stan_0_1;
vector[20] x_stan_0_2;
real x_stan_0_3;
real x_stan_0_4;
}
model {
real v_0_3;
real v_0_4;
real v_0_5;
real v_0_6;
real v_0_7;
real v_0_8;
vector[20] v_0_12;
vector[20] v_0_13;
v_0_3 = to_real(x_stan_0_4) ./ to_real(6.283185307179586);
v_0_4 = normal_lpdf(0 | 0, v_0_3);
v_0_5 = exp(v_0_4);
v_0_6 = to_real(v_0_5) ./ to_real(20);
v_0_7 = sqrt(v_0_6);
v_0_8 = x_stan_0_0 .* v_0_7;
for (i_1_1 in 1:20) {
v_0_12[i_1_1] = 0;
}
for (i_1_1 in 1:20) {
v_0_13[i_1_1] = 1;
}
x_stan_0_0 ~ normal(0, 1);
x_stan_0_1 ~ normal(v_0_12, v_0_13);
x_stan_0_2 ~ normal(v_0_12, v_0_13);
x_stan_0_3 ~ gamma(1, 1);
x_stan_0_4 ~ gamma(1, 1);
for (i_1_1 in 1:10) {
real v_1_0;
vector[20] v_1_1;
real v_1_2;
real v_1_3;
real v_1_4;
real v_1_5;
v_1_0 = 6.283185307179586 .* x_stan_0_5[i_1_1];
for (i_2_1 in 1:20) {
real v_2_0;
real v_2_1;
real v_2_2;
real v_2_3;
real v_2_4;
real v_2_5;
real v_2_6;
real v_2_7;
real v_2_8;
real v_2_9;
real v_2_10;
real v_2_11;
real v_2_12;
v_2_0 = to_real(i_2_1) ./ to_real(20);
v_2_1 = normal_lpdf(v_2_0 | 0, v_0_3);
v_2_2 = exp(v_2_1);
v_2_3 = to_real(v_2_2) ./ to_real(20);
v_2_4 = sqrt(v_2_3);
v_2_5 = v_1_0 .* i_2_1;
v_2_6 = to_real(v_2_5) ./ to_real(20);
v_2_7 = cos(v_2_6);
v_2_8 = x_stan_0_1[i_2_1] .* v_2_7;
v_2_9 = sin(v_2_6);
v_2_10 = x_stan_0_2[i_2_1] .* v_2_9;
v_2_11 = v_2_8 + v_2_10;
v_2_12 = v_2_4 .* v_2_11;
v_1_1[i_2_1] = v_2_12;
}
v_1_2 = 0;
for (i_2_0 in 1:20) {
real i_2_11;
real i_2_12;
i_2_11 = v_1_1[i_2_0];
i_2_12 = v_1_2;
{
real v_2_0;
v_2_0 = i_2_11 + i_2_12;
v_1_2 = v_2_0;
}
}
v_1_3 = 1.4142135623730951 .* v_1_2;
v_1_4 = v_0_8 + v_1_3;
v_1_5 = x_stan_0_3 .* v_1_4; x_stan_0_6[i_1_1] ~ normal(v_1_5, 0.1);
}
}
make -C /home/jovyan/stochaskell/cmdstan /home/jovyan/stochaskell/cache/stan/model_e6bf13ca62b8b7b248101d3b53de582f6eebd761
make[1]: Entering directory '/home/jovyan/stochaskell/cmdstan'
--- Translating Stan model to C++ code ---
bin/stanc --o=/home/jovyan/stochaskell/cache/stan/model_e6bf13ca62b8b7b248101d3b53de582f6eebd761.hpp /home/jovyan/stochaskell/cache/stan/model_e6bf13ca62b8b7b248101d3b53de582f6eebd761.stan
Model name=model_e6bf13ca62b8b7b248101d3b53de582f6eebd761_model
Input file=/home/jovyan/stochaskell/cache/stan/model_e6bf13ca62b8b7b248101d3b53de582f6eebd761.stan
Output file=/home/jovyan/stochaskell/cache/stan/model_e6bf13ca62b8b7b248101d3b53de582f6eebd761.hpp
--- Compiling, linking C++ code ---
g++ -std=c++1y -pthread -Wno-sign-compare -O3 -I src -I stan/src -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.69.0 -I stan/lib/stan_math/lib/sundials_4.1.0/include -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -c -x c++ -o /home/jovyan/stochaskell/cache/stan/model_e6bf13ca62b8b7b248101d3b53de582f6eebd761.o /home/jovyan/stochaskell/cache/stan/model_e6bf13ca62b8b7b248101d3b53de582f6eebd761.hpp
g++ -std=c++1y -pthread -Wno-sign-compare -O3 -I src -I stan/src -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.69.0 -I stan/lib/stan_math/lib/sundials_4.1.0/include -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION src/cmdstan/main.o stan/lib/stan_math/lib/sundials_4.1.0/lib/libsundials_nvecserial.a stan/lib/stan_math/lib/sundials_4.1.0/lib/libsundials_cvodes.a stan/lib/stan_math/lib/sundials_4.1.0/lib/libsundials_idas.a /home/jovyan/stochaskell/cache/stan/model_e6bf13ca62b8b7b248101d3b53de582f6eebd761.o -o /home/jovyan/stochaskell/cache/stan/model_e6bf13ca62b8b7b248101d3b53de582f6eebd761
make[1]: Leaving directory '/home/jovyan/stochaskell/cmdstan'
--- Sampling Stan model ---
/home/jovyan/stochaskell/cache/stan/model_e6bf13ca62b8b7b248101d3b53de582f6eebd761 method=sample num_samples=1000 num_warmup=1000 save_warmup=0 thin=1 adapt engaged=1 algorithm=hmc engine=nuts max_depth=10 metric=diag_e stepsize=1.0 stepsize_jitter=0.0 data file=/tmp/stan-59ed7c2ded52e227/stan.data init=/tmp/stan-59ed7c2ded52e227/stan.init output file=/tmp/stan-59ed7c2ded52e227/stan.csv
method = sample (Default)
sample
num_samples = 1000 (Default)
num_warmup = 1000 (Default)
save_warmup = 0 (Default)
thin = 1 (Default)
adapt
engaged = 1 (Default)
gamma = 0.050000000000000003 (Default)
delta = 0.80000000000000004 (Default)
kappa = 0.75 (Default)
t0 = 10 (Default)
init_buffer = 75 (Default)
term_buffer = 50 (Default)
window = 25 (Default)
algorithm = hmc (Default)
hmc
engine = nuts (Default)
nuts
max_depth = 10 (Default)
metric = diag_e (Default)
metric_file = (Default)
stepsize = 1 (Default)
stepsize_jitter = 0 (Default)
id = 0 (Default)
data
file = /tmp/stan-59ed7c2ded52e227/stan.data
init = /tmp/stan-59ed7c2ded52e227/stan.init
random
seed = -1 (Default)
output
file = /tmp/stan-59ed7c2ded52e227/stan.csv
diagnostic_file = (Default)
refresh = 100 (Default)
Gradient evaluation took 0.00022 seconds
1000 transitions using 10 leapfrog steps per transition would take 2.2 seconds.
Adjust your expectations accordingly!
Iteration: 1 / 2000 [ 0%] (Warmup)
Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Exception: normal_lpdf: Scale parameter is -0.00763495, but must be > 0! (in '/home/jovyan/stochaskell/cache/stan/model_e6bf13ca62b8b7b248101d3b53de582f6eebd761.stan' at line 42)
If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Exception: normal_lpdf: Scale parameter is -0.106511, but must be > 0! (in '/home/jovyan/stochaskell/cache/stan/model_e6bf13ca62b8b7b248101d3b53de582f6eebd761.stan' at line 42)
If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Iteration: 100 / 2000 [ 5%] (Warmup)
Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Exception: normal_lpdf: Scale parameter is -0.00585475, but must be > 0! (in '/home/jovyan/stochaskell/cache/stan/model_e6bf13ca62b8b7b248101d3b53de582f6eebd761.stan' at line 42)
If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Iteration: 200 / 2000 [ 10%] (Warmup)
Iteration: 300 / 2000 [ 15%] (Warmup)
Iteration: 400 / 2000 [ 20%] (Warmup)
Iteration: 500 / 2000 [ 25%] (Warmup)
Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Exception: normal_lpdf: Scale parameter is -0.0366805, but must be > 0! (in '/home/jovyan/stochaskell/cache/stan/model_e6bf13ca62b8b7b248101d3b53de582f6eebd761.stan' at line 42)
If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Iteration: 600 / 2000 [ 30%] (Warmup)
Iteration: 700 / 2000 [ 35%] (Warmup)
Iteration: 800 / 2000 [ 40%] (Warmup)
Iteration: 900 / 2000 [ 45%] (Warmup)
Iteration: 1000 / 2000 [ 50%] (Warmup)
Iteration: 1001 / 2000 [ 50%] (Sampling)
Iteration: 1100 / 2000 [ 55%] (Sampling)
Iteration: 1200 / 2000 [ 60%] (Sampling)
Iteration: 1300 / 2000 [ 65%] (Sampling)
Iteration: 1400 / 2000 [ 70%] (Sampling)
Iteration: 1500 / 2000 [ 75%] (Sampling)
Iteration: 1600 / 2000 [ 80%] (Sampling)
Iteration: 1700 / 2000 [ 85%] (Sampling)
Iteration: 1800 / 2000 [ 90%] (Sampling)
Iteration: 1900 / 2000 [ 95%] (Sampling)
Iteration: 2000 / 2000 [100%] (Sampling)
Elapsed Time: 15.7447 seconds (Warm-up)
8.34643 seconds (Sampling)
24.0911 seconds (Total)
Stan took 24.656232831s
# stan_version_major = 2
# stan_version_minor = 20
# stan_version_patch = 0
# model = model_e6bf13ca62b8b7b248101d3b53de582f6eebd761_model
# method = sample (Default)
# sample
# num_samples = 1000 (Default)
# num_warmup = 1000 (Default)
# save_warmup = 0 (Default)
# thin = 1 (Default)
# adapt
# engaged = 1 (Default)
# gamma = 0.050000000000000003 (Default)
# delta = 0.80000000000000004 (Default)
# kappa = 0.75 (Default)
# t0 = 10 (Default)
# init_buffer = 75 (Default)
# term_buffer = 50 (Default)
# window = 25 (Default)
# algorithm = hmc (Default)
# hmc
# engine = nuts (Default)
# nuts
# max_depth = 10 (Default)
# metric = diag_e (Default)
# metric_file = (Default)
# stepsize = 1 (Default)
# stepsize_jitter = 0 (Default)
# id = 0 (Default)
# data
# file = /tmp/stan-59ed7c2ded52e227/stan.data
# init = /tmp/stan-59ed7c2ded52e227/stan.init
# random
# seed = -1 (Default)
# output
# file = /tmp/stan-59ed7c2ded52e227/stan.csv
# diagnostic_file = (Default)
# refresh = 100 (Default)
# Adaptation terminated
# Step size = 0.0606685
# Diagonal elements of inverse mass matrix:
# 0.373408, 0.311495, 0.412781, 0.480178, 0.492721, 0.492969, 0.624931, 0.759556, 0.98318, 0.944732, 0.813175, 1.0754, 0.992736, 1.10151, 0.863845, 1.1199, 1.03045, 0.898382, 0.990462, 0.931562, 1.08195, 0.456203, 0.514514, 0.756294, 0.462145, 0.426067, 0.485763, 0.628156, 0.799072, 0.765683, 1.06579, 1.00344, 0.9537, 0.985086, 0.920023, 0.834636, 1.04615, 0.96495, 0.836129, 0.908569, 0.912248, 0.0825406, 0.0403844
#
# Elapsed Time: 15.7447 seconds (Warm-up)
# 8.34643 seconds (Sampling)
# 24.0911 seconds (Total)
#
Extracting: x_stan_0_0, x_stan_0_1, x_stan_0_2, x_stan_0_3, x_stan_0_4
--- Removing temporary files ---