Skip to content

Commit d72c169

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents ec08328 + 30e8781 commit d72c169

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

examples/arsenic/demo_wells.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ sm3 = SampleModel("arsenic_logistic_t", model_str; tmpdir=tmpdir);
9292
cvitr, cvitst = cvit(n, 10, true)
9393
kfcvs = similar(loos)
9494
for cvi in 1:10
95-
@printf("%d\n", cvi)
96-
9795
standatacv = (p = m, N = length(cvitr[cvi]), Nt = length(cvitst[cvi]),
9896
x = x[cvitr[cvi],:], y = Int.(y[cvitr[cvi]]),
9997
xt = x[cvitst[cvi],:], yt = Int.(y[cvitst[cvi]]))
@@ -104,14 +102,14 @@ for cvi in 1:10
104102
nt3 = read_samples(sm3)
105103
# Compute LOO and standard error
106104
log_likt = nt3.log_likt'
107-
n_sam, n_obs = size(log_lik)
108-
kfcvs[cvitst[cvi]] =
105+
local n_sam, n_obs = size(log_likt)
106+
kfcvs[cvitst[cvi]] .=
109107
reshape(logsumexp(log_likt .- log(n_sam); dims=1), n_obs)
110108
end
111109
end
112110

113111
# compare PSIS-LOO and k-fold-CV
114112
plot([-3.5, 0], [-3.5, 0], color=:red)
115-
scatter!(loos[1,:], kfcvs[1,:], xlab = "PSIS-LOO", ylab = "10-fold-CV",
113+
scatter!(loos1, kfcvs, xlab = "PSIS-LOO", ylab = "10-fold-CV",
116114
leg=false, color=:darkblue)
117115
savefig(joinpath(ProjDir, "compare.png"))

examples/roaches/diag_plot_1.png

326 Bytes
Loading

examples/roaches/diag_plot_2.png

-1.1 KB
Loading

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using PSIS, StanSample
1+
using ParetoSmoothedImportanceSampling, StanSample
22
using Test
33

44
if haskey(ENV, "JULIA_CMDSTAN_HOME")

0 commit comments

Comments
 (0)