From 42746ec1ed2ebc8545462cdda14140577ffb8ac4 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Fri, 30 Jan 2015 03:02:38 -0500 Subject: [PATCH] removing old models that were meant for testing only --- command.data.R | 1 - command.stan | 14 ------- speed/empty.jags | 0 speed/logistic/logistic.data.R | 52 ------------------------- speed/logistic/logistic.stan | 16 -------- speed/logistic/logistic_generate_data.R | 31 --------------- transforms/bounded_double.stan | 6 --- transforms/correlation_matrix.stan | 11 ------ transforms/simplex.stan | 6 --- transforms/unit_vector.stan | 6 --- 10 files changed, 143 deletions(-) delete mode 100644 command.data.R delete mode 100644 command.stan delete mode 100644 speed/empty.jags delete mode 100644 speed/logistic/logistic.data.R delete mode 100644 speed/logistic/logistic.stan delete mode 100644 speed/logistic/logistic_generate_data.R delete mode 100644 transforms/bounded_double.stan delete mode 100644 transforms/correlation_matrix.stan delete mode 100644 transforms/simplex.stan delete mode 100644 transforms/unit_vector.stan diff --git a/command.data.R b/command.data.R deleted file mode 100644 index 3f4852397..000000000 --- a/command.data.R +++ /dev/null @@ -1 +0,0 @@ -mu <- 0.0 \ No newline at end of file diff --git a/command.stan b/command.stan deleted file mode 100644 index f529927fa..000000000 --- a/command.stan +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Command.stan used by src/test/models/command.stan to test arguments passed to - * the compiled model. - * - */ -data { - real mu; -} -parameters { - real y; -} -model { - y ~ normal(mu,1); -} diff --git a/speed/empty.jags b/speed/empty.jags deleted file mode 100644 index e69de29bb..000000000 diff --git a/speed/logistic/logistic.data.R b/speed/logistic/logistic.data.R deleted file mode 100644 index f5dd5907e..000000000 --- a/speed/logistic/logistic.data.R +++ /dev/null @@ -1,52 +0,0 @@ -N <- -128 -M <- -2 -y <- -c(0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, -1, 1, 0) -x <- -structure(c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1.3297992629225, 1.2724293214294, 0.414641434456408, --1.53995004190371, -0.928567034713538, -0.29472044679056, -0.00576717274753696, -2.40465338885795, 0.76359346114046, -0.799009248989368, -1.14765700923635, --0.289461573688223, -0.299215117897316, -0.411510832795067, 0.252223448156132, --0.891921127284569, 0.435683299355719, -1.23753842192996, -0.224267885278309, -0.377395645981701, 0.133336360814841, 0.804189509744908, -0.0571067743838088, -0.503607972233726, 1.08576936214569, -0.69095383969683, -1.28459935387219, -0.046726172188352, -0.235706556439501, -0.542888255010254, -0.433310317456782, --0.649471646796233, 0.726750747385451, 1.1519117540872, 0.992160365445798, --0.429513109491881, 1.23830410085338, -0.279346281854269, 1.75790308981071, -0.560746090888056, -0.452783972553158, -0.832043296117832, -1.16657054708471, --1.0655905803883, -1.563782051071, 1.15653699715018, 0.83204712857239, --0.227328691424755, 0.266137361672105, -0.376702718583628, 2.44136462889459, --0.795339117255372, -0.0548774737115786, 0.250141322854153, 0.618243293566247, --0.172623502645857, -2.22390027400994, -1.26361438497058, 0.358728895971352, --0.0110454784656636, -0.940649162618608, -0.115825322156954, --0.814968708869917, 0.242263480859686, -1.4250983947325, 0.36594112304922, -0.248412648872596, 0.0652881816716207, 0.0191563916602738, 0.257338377155533, --0.649010077708898, -0.119168762418038, 0.66413569989411, 1.10096910219409, -0.14377148075807, -0.117753598165951, -0.912068366948338, -1.43758624082998, --0.797089525071965, 1.25408310644997, 0.77214218580453, -0.21951562675344, --0.424810283377287, -0.418980099421959, 0.996986860909106, -0.275778029088027, -1.2560188173061, 0.646674390495345, 1.29931230256343, -0.873262111744435, -0.00837095999603331, -0.880871723252545, 0.59625901661066, 0.119717641289537, --0.282173877322451, 1.45598840106634, 0.229019590694692, 0.996543928544126, -0.781859184600258, -0.776776621764597, -0.615989907707918, 0.0465803028049967, --1.13038577760069, 0.576718781896486, -1.28074943178832, 1.62544730346494, --0.500696596002705, 1.67829720781629, -0.412519887482398, -0.97228683550556, -0.0253828675878054, 0.0274753367451927, -1.68018272239593, 1.05375086302862, --1.11959910457218, 0.335617209968815, 0.494795767113158, 0.138052708711737, --0.118792025778828, 0.197684262345795, -1.06869271125479, -0.803213217364741, --1.11376513631953, 1.58009168370384, 1.49781876103841, 0.262645458662762, --1.23290119957126, -0.00372353379218051), .Dim = c(128L, 2L)) diff --git a/speed/logistic/logistic.stan b/speed/logistic/logistic.stan deleted file mode 100644 index 1adace73e..000000000 --- a/speed/logistic/logistic.stan +++ /dev/null @@ -1,16 +0,0 @@ -data { - int N; // number of items - int M; // number of predictors - int y[N]; // outcomes - row_vector[M] x[N]; // predictors -} -parameters { - vector[M] beta; // coefficients -} -model { - for (m in 1:M) - beta[m] ~ cauchy(0.0, 2.5); - - for (n in 1:N) - y[n] ~ bernoulli(inv_logit(x[n] * beta)); -} diff --git a/speed/logistic/logistic_generate_data.R b/speed/logistic/logistic_generate_data.R deleted file mode 100644 index eacaf96c0..000000000 --- a/speed/logistic/logistic_generate_data.R +++ /dev/null @@ -1,31 +0,0 @@ -logit <- function(p) { - return (log(p / (1-p))); -} - -inv_logit <- function(alpha) { - return (1 / (1 + exp(-alpha))); -} - -logistic_generate_data <- function(N, M, file="dat", seed=0) { - set.seed(seed); - beta <- rnorm(M, sd=1); - x <- matrix(0,N,M); - x[1:N,2:M] <- matrix(rnorm((M-1)*N), N, M-1); # same scale (favors Stan, which is not scale invariant) - x[1:N,1] <- 1 - y <- as.vector(ifelse(inv_logit(x %*% beta) > runif(N), 1, 0)); - dump(c("N", "M", "y", "x"), file=paste(file, ".data.R", sep="")); - dump(c("beta", "seed"), file=paste(file, "_param.data.R", sep="")); - #return (list(alpha=alpha, beta=beta, x=x, y=y)); -} - - -## generate data -N <- c(128, 1024, 4096); #, 16K-ish -M <- c(2, 8, 32, 128, 512); # , 2048); -for (n in N) { - for (m in M) { - if (n > m) - logistic_generate_data(n, m, file=paste("logistic_", n, "_", m, sep="")); - } -} - diff --git a/transforms/bounded_double.stan b/transforms/bounded_double.stan deleted file mode 100644 index 1e1aebbd1..000000000 --- a/transforms/bounded_double.stan +++ /dev/null @@ -1,6 +0,0 @@ -parameters { - real rho; -} -model { - /* uniform on support */ -} diff --git a/transforms/correlation_matrix.stan b/transforms/correlation_matrix.stan deleted file mode 100644 index 00c79e02a..000000000 --- a/transforms/correlation_matrix.stan +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Sample a correlation matrix uniformly. - * 2D = [ [1 rho] [rho 1] ] == 1 parameter - */ - -parameters { - corr_matrix[3] m; -} -model { - /* uniform model */ -} diff --git a/transforms/simplex.stan b/transforms/simplex.stan deleted file mode 100644 index 11834d43a..000000000 --- a/transforms/simplex.stan +++ /dev/null @@ -1,6 +0,0 @@ -parameters { - simplex[3] theta; -} -model { - /* uniform over simplex */ -} diff --git a/transforms/unit_vector.stan b/transforms/unit_vector.stan deleted file mode 100644 index e11d0f0fc..000000000 --- a/transforms/unit_vector.stan +++ /dev/null @@ -1,6 +0,0 @@ -parameters { - unit_vector[3] theta; -} -model { - /* uniform over simplex */ -}