diff --git a/assets/stan_demos/ar_k.stan b/assets/stan_demos/ar_k.stan index 3de67f4..360a9cf 100644 --- a/assets/stan_demos/ar_k.stan +++ b/assets/stan_demos/ar_k.stan @@ -1,6 +1,6 @@ data { - int K; // model order - int N; // dataset size + int K; // model order + int N; // dataset size vector[N] y; } parameters { diff --git a/assets/stan_demos/ar_k_fa.stan b/assets/stan_demos/ar_k_fa.stan index f0b57c9..01722d7 100644 --- a/assets/stan_demos/ar_k_fa.stan +++ b/assets/stan_demos/ar_k_fa.stan @@ -1,5 +1,6 @@ data { - int N, K; + int K; // model order + int N; // dataset size array[N] int free; vector[N] y; } diff --git a/assets/stan_demos/imdb.stan b/assets/stan_demos/imdb.stan index a4304b4..9dc61c6 100644 --- a/assets/stan_demos/imdb.stan +++ b/assets/stan_demos/imdb.stan @@ -1,13 +1,13 @@ data { - int N; // num products - array[N, 5] int ratings; + int N; // num products + array[N, 5] int ratings; } parameters { vector[5] alpha; array[N] simplex[5] d; } model { - d ~ dirichlet(alpha); + d ~ dirichlet(alpha); // for all d[i] for (i in 1:N) { ratings[i] ~ multinomial(d[i]); } diff --git a/assets/stan_demos/imdb_inference.stan b/assets/stan_demos/imdb_inference.stan index 4b4d104..b64c3ba 100644 --- a/assets/stan_demos/imdb_inference.stan +++ b/assets/stan_demos/imdb_inference.stan @@ -1,6 +1,6 @@ data { vector[5] alpha; - array[5] int rating; + array[5] int rating; } parameters { simplex[5] d; diff --git a/assets/stan_demos/inhomogeneous_poisson_process.stan b/assets/stan_demos/inhomogeneous_poisson_process.stan index eecfa1a..fba02d3 100644 --- a/assets/stan_demos/inhomogeneous_poisson_process.stan +++ b/assets/stan_demos/inhomogeneous_poisson_process.stan @@ -1,5 +1,5 @@ data { - int N; // Number of observed events + int N; // Number of observed events real T; // End of observation interval vector[N] t; // Times of events } diff --git a/assets/stan_demos/lasso_multivariate.stan b/assets/stan_demos/lasso_multivariate.stan index 0553809..6a3e316 100644 --- a/assets/stan_demos/lasso_multivariate.stan +++ b/assets/stan_demos/lasso_multivariate.stan @@ -1,6 +1,6 @@ data { + int K; int N; - int K; matrix[N, K] x; vector[N] y; real lambda; diff --git a/assets/stan_demos/mlp.stan b/assets/stan_demos/mlp.stan index 796fca6..2b3f87b 100644 --- a/assets/stan_demos/mlp.stan +++ b/assets/stan_demos/mlp.stan @@ -1,5 +1,5 @@ data { - int M, N, K; + int M, N, K; matrix[M, N] x; array[M] int y; } diff --git a/assets/stan_demos/ols_multivariate.stan b/assets/stan_demos/ols_multivariate.stan index fe58934..2004e57 100644 --- a/assets/stan_demos/ols_multivariate.stan +++ b/assets/stan_demos/ols_multivariate.stan @@ -1,6 +1,6 @@ data { - int N; - int K; + int K; + int N; matrix[N, K] x; vector[N] y; } diff --git a/assets/stan_demos/ols_univariate.stan b/assets/stan_demos/ols_univariate.stan index 0eac821..a5c5a21 100644 --- a/assets/stan_demos/ols_univariate.stan +++ b/assets/stan_demos/ols_univariate.stan @@ -1,5 +1,5 @@ data { - int N; + int N; vector[N] x; vector[N] y; } diff --git a/assets/stan_demos/poisson_glm.stan b/assets/stan_demos/poisson_glm.stan index 1f79102..dc63de3 100644 --- a/assets/stan_demos/poisson_glm.stan +++ b/assets/stan_demos/poisson_glm.stan @@ -1,6 +1,6 @@ data { - int N; - int K; + int N; + int K; array[N] int y; matrix[N, K] x; // features } diff --git a/assets/stan_demos/ridge_multivariate.stan b/assets/stan_demos/ridge_multivariate.stan index 2849b74..30969c9 100644 --- a/assets/stan_demos/ridge_multivariate.stan +++ b/assets/stan_demos/ridge_multivariate.stan @@ -1,6 +1,6 @@ data { + int K; int N; - int K; matrix[N, K] x; vector[N] y; real lambda; diff --git a/assets/stan_demos/trivial_learning.stan b/assets/stan_demos/trivial_learning.stan index 57a3d23..e98e819 100644 --- a/assets/stan_demos/trivial_learning.stan +++ b/assets/stan_demos/trivial_learning.stan @@ -1,9 +1,9 @@ data { - int N; - array[N] int x; + int N; // num samples + array[N] int x; // data } parameters { - real lambda; + real lambda; // to learn } model { x ~ poisson(lambda); diff --git a/assets/stan_demos/trivial_learning_custom.stan b/assets/stan_demos/trivial_learning_custom.stan index 88e241f..0ddcd23 100644 --- a/assets/stan_demos/trivial_learning_custom.stan +++ b/assets/stan_demos/trivial_learning_custom.stan @@ -8,7 +8,7 @@ functions { } } data { - int N; + int N; array[N] int x; } parameters {