-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDS.Rmd
521 lines (443 loc) · 17.9 KB
/
DS.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
---
title: "DS[1,2,3,3s,4,5]"
date: '`r format(Sys.time(), "%d %B, %Y")`'
output: pdf_document
toc: true
---
```{r setup, include=FALSE}
library(reshape2)
library(ggplot2)
library(knitr)
library(tidyr)
library(dplyr)
library(kableExtra)
library(ape)
knitr::opts_chunk$set(echo = TRUE, fig.path='Figs/')
```
\newpage
# The dubious methods
- SRF: posterior distribution cacluated with golden runs
- NMC: naive Monte Carlo with 10,000 samples
- ELBO: evidence lower bound (mean field Gaussian)
- HM: harmonic mean
- SHM: stabilized harmonic mean
- SS: stepping stone with 50 power posteriors
- GSS: generalized stepping stone with 50 power posterior. Reference distribution is independent gamma distributions.
- PS: path sampling with beta(0.3,1) and 50 power posteriors
- PS2: modified path sampling with beta(0.3,1) and 50 power posteriors
- ML: maximum likleihood
- MAP: maximum a posteriori using exp(10) as prior on each branch
- BS: bridge sampling
- NS: nested sampling
- CPO: conditional predictive ordinate
- LPPD: log pointwise predictive density
- GL: gamma Laplace
- LL: lognormal Laplace
- BL: beta' Laplace
- GLIS: gamma Laplace with importance sampling (10,000 samples)
- VBIS: Importance sampling using a variational distribution as the importance distribution 10,000 samples
```{r}
log.sum.exp<- function(x) {
# Computes log(sum(exp(x))
# Uses offset trick to avoid numeric overflow: http://jblevins.org/notes/log-sum-exp
# if ( max(abs(x)) > max(x) )
# offset <- min(x)
# else
offset <- max(x)
log(sum(exp(x - offset))) + offset
}
kl.log.pq <- function(P,Q, normalize=FALSE){
if(normalize){
Q = Q - log.sum.exp(Q)
P = P - log.sum.exp(P)
}
sum(exp(P)*(P-Q))
}
normalize <- function(P){
return(P - log.sum.exp(P))
}
h.log.pq <-function(P, Q, normalize=FALSE){
if(normalize){
Q = Q - log.sum.exp(Q)
P = P - log.sum.exp(P)
}
sqrt(sum( (sqrt(exp(P)) - sqrt(exp(Q)))^2 ))/sqrt(2)
}
rmsd <- function(a,b){
sqrt(mean((a-b)^2))
}
rmsd2 <- function(tree, P, Q, ptrees, pp){
Q = Q - log.sum.exp(Q)
P = P - log.sum.exp(P)
Q = exp(Q[order(tree)])
P = exp(P[order(tree)])
msd = 0
for(i in 1:length(pp)){
msdi = 0
for(j in 1:length(ptrees)){
if(list(pp[[i]]) %in% ptrees[[j]]){
msdi = msdi + Q[j] - P[j]
}
}
msd = msd + msdi*msdi
}
sqrt(msd/length(pp))
}
splits <- function(data, ptrees){
Q = data$marginal - log.sum.exp(data$marginal)
P = data$SRF - log.sum.exp(data$SRF)
Q = exp(Q[order(data$tree)])
P = exp(P[order(data$tree)])
splits = list()
f = c()
fhat = c()
count = c()
# iterate over every treee
for(i in 1:length(ptrees)){
# iterate over every splits
for(k in 1:length(ptrees[[i]])){
found = F
bipart = ptrees[[i]][[k]]
if(length(splits) > 0){
for(j in 1:length(splits)){
if(list(bipart) %in% list(splits[[j]])){
found = T
f[j] = f[j]+P[i]
fhat[j] = fhat[j]+Q[i]
count[j] = count[j] + 1
break
}
}
}
else
j = 0
if(!found){
j = j + 1
f[j] = P[i]
fhat[j] = Q[i]
splits[[j]] = bipart
count[j] = 1
}
}
}
list(data=data.frame(f=f, fhat=fhat,count=count), splits=splits)
}
read.ds <- function(dataset, force=F){
#trees.file = file.path('data', paste0(dataset, ".trees", sep=""))
trees.file = paste0('/Users/mathieu/Desktop/marginal-experiments/data/JC_no_gamma_credible_set_ds', substr(dataset, nchar(dataset), nchar(dataset)))
if(file.exists(paste0(dataset, '.Rdata')) & force!=T){
load(paste0(dataset, '.Rdata'))
return(res)
}
df = read.csv(file.path(dataset, paste(dataset, ".csv", sep="")), sep='\t')
# total time
total = sum(df$time)
srf = read.csv(file.path(dataset, "data.csv"), sep='\t')
srf = srf %>% mutate(SRF=log(SRF))
df = mutate(df, rep=rep+1)
dfff = df %>% filter(algorithm %in% c('mcmc', 'mmcmc', 'mmcmc-gss'))%>%
spread(algorithm,time) %>% select(-marginal)
df = filter(df, !(algorithm %in% c('mcmc', 'mmcmc', 'mmcmc-gss')))
dfff = dfff %>% right_join(df, by=c('rep','tree'))
#MMCMC
for(m in c('SS', 'PS', 'PS2')){
dfff[dfff$algorithm==m,]$time = dfff[dfff$algorithm==m,]$time +
dfff[dfff$algorithm==m,]$mmcmc
}
#MCMC
for(m in c('BS', 'CPO', 'LPPD', 'HM', 'SHM')){
dfff[dfff$algorithm==m,]$time = dfff[dfff$algorithm==m,]$time +
dfff[dfff$algorithm==m,]$mcmc
}
dfff[dfff$algorithm=='GSS',]$time = dfff[dfff$algorithm=='GSS',]$time +
dfff[dfff$algorithm=='GSS',]$`mmcmc-gss`
df.time = dfff %>% group_by(algorithm) %>%
summarise(median=median(time),mean=mean(time), sd=sd(time), cv=sd(time)/mean(time)) %>%
arrange(algorithm) %>% mutate(dataset=dataset)
# KL
df.kl = dfff %>% full_join(srf, by='tree') %>% group_by(rep, algorithm) %>%
summarize(KL=kl.log.pq(SRF, marginal, TRUE), H=h.log.pq(SRF, marginal, TRUE)) %>%
arrange(algorithm) %>% mutate(dataset=dataset)
#RMSD
trees = read.tree(trees.file, keep.multi =TRUE)
trees = .compressTipLabel(trees)
ntree <- length(trees)
class(trees) <- NULL
for (i in 1:ntree) storage.mode(trees[[i]]$Nnode) <- "integer"
class(trees) <- "multiPhylo"
trees <- reorder(trees, "postorder")
ptrees = lapply(trees, prop.part)
dfff = dfff %>% group_by(rep, algorithm) %>% mutate(Posterior=normalize(marginal)) %>%
ungroup() %>% mutate(dataset=dataset)
temp = dfff %>% full_join(srf, by='tree')
split.freqs = NULL
replicates = unique(as.character(temp$rep))
for(replicate in replicates){
for(a in unique(as.character(temp$algorithm))){
data = temp %>% filter(algorithm==a&rep==replicate) %>% select(tree, SRF, marginal)
res = splits(data, ptrees)
split.freq = res[['data']]
bips = res[['splits']]
split.freq = cbind(split.freq, algorithm=rep(a, nrow(split.freq)), rep=rep(replicate, nrow(split.freq)))
if(is.null(split.freqs))
split.freqs = split.freq
else
split.freqs = rbind(split.freq,split.freqs)
}
}
df.rmsd = split.freqs %>% group_by(algorithm, rep) %>% summarize(RMSD=rmsd(f,fhat)) %>%
arrange(algorithm) %>% mutate(dataset=dataset)
# plot
myorder = df.kl %>% filter(rep==1) %>% arrange(KL) %>% ungroup() %>%
select(algorithm) %>% unlist(use.names = FALSE) %>% as.vector
df.plot = dfff %>% full_join(srf, by='tree') %>%
mutate(algorithm=factor(algorithm, levels=myorder), dataset=dataset)
res = list(time=df.time, kl=df.kl, plot=df.plot, marginals=dfff,rmsd=df.rmsd,total=total,splits=split.freqs)
save(res, file=paste0(dataset, '.Rdata'))
res
}
f = function(.o,.f,.kl,.rmsd) paste0('atop(atop(',
'textstyle(',deparse(.f),'),',
'textstyle(RMSD == "',formatC(.rmsd, format='e', digits=1),'")),',
'textstyle(KL == "',formatC(.kl, format='e', digits=1),'"))')
datasets = paste0('DS', 1:5)
origin=c('GSS', 'GLIS', 'VBIS', 'BS', 'SS', 'PS', 'PS2', 'LL', 'ML', 'MAP', 'GL',
'ELBO', 'LPPD', 'BL', 'CPO', 'SHM', 'HM', 'NS', 'NMC')
final=c("GSS", "GLIS", "VBIS", "BS", "SS", "PS", "MPS", "LL", "ML", "MAP", "GL",
"ELBO", "PPD", "BL", "CPO", "SHM", "HM", "NS", "NMC")
# final=c("GSS", expression("LG"["IS"]), expression("VB"["IS"]), "BS", "SS", "PS", "PSm", "LL", "ML", "MAP", "LG",
# "ELBO", "PPD", "LB", "CPO", "SHM", "HM", "NS", "NMC")
# final2=c("GSS", bquote("LG"["IS"]), bquote("VB"["IS"]), "BS", "SS", "PS", "PSm", "LL", "ML", "MAP", "LG",
# "ELBO", "PPD", "LB", "CPO", "SHM", "HM", "NS", "NMC")
color_datasets = c(rgb(141,160,203,max=255), rgb(252,141,98,max=255), rgb(102,194,165,max=255),
rgb(225,198,47,max=255),#rgb(175,175,175,max=255),
rgb(204,121,167,max=255))
shape_datasets <- c(3,17,18,19,4)
theme_set(theme_bw(16) + theme(strip.background = element_blank()))
```
\newpage
# DS1 to DS5 together
```{r load-all}
df = read.ds(datasets[1])
df = lapply(df, as.data.frame)
all.kl = as.data.frame(df[['kl']])
all.rmsd = df[['rmsd']]
all.time = df[['time']]
all.plot = df[['plot']]
all.marginal = df[['marginals']]
total = df[['total']]
for(i in 2:length(datasets)){
df = read.ds(datasets[i])
total = total + df[['total']]
df = lapply(df, as.data.frame)
all.kl = rbind(all.kl, df[['kl']])
all.rmsd = rbind(all.rmsd, df[['rmsd']])
all.time = rbind(all.time, df[['time']])
all.plot = rbind(all.plot, df[['plot']])
all.marginal = rbind(all.marginal, df[['marginals']])
}
myrange<-function(x){max(x)-min(x)}
df.plot = all.plot %>% filter(algorithm=="GSS") %>% group_by(rep,dataset) %>% summarize(range=myrange(marginal)) %>% spread(dataset, range)
kable(df.plot)
```
\newpage
## RMSD vs time
```{r RMSD_vs_time}
all.rmsd.time = all.rmsd %>% filter(!(algorithm %in% c('MAP', 'PS', 'PS2', 'BL'))) %>%
group_by(algorithm, dataset) %>% summarise(medianRMSD=median(RMSD),meanRMSD=mean(RMSD)) %>% ungroup() %>%
left_join(all.time, by=c('dataset','algorithm'))
all.rmsd.time = all.rmsd.time %>% mutate(d=substr(dataset, 3,3)) %>% mutate(label=paste0(algorithm, d))
label_formated= Map(.a=as.character(all.rmsd.time$algorithm), .b=all.rmsd.time$d, f = function(.a,.b) bquote(list(.(.a)^.(.b))))
all.rmsd.time$label2 = sapply(label_formated, deparse)
ggplot(all.rmsd.time, aes(x=mean, y=meanRMSD, col=algorithm,label=label2)) +
scale_x_log10()+
scale_y_log10() +
geom_hline(yintercept = 0.01) +
geom_hline(yintercept = 0.05, linetype="dashed") +
geom_text(size=3, show.legend = FALSE, parse=TRUE) +
xlab("Running time (seconds) per tree") +
ylab("RMSD")
```
\newpage
## KL vs time
```{r kl_vs_time}
all.kl.time = all.kl %>% filter(!(algorithm %in% c('MAP', 'PS', 'PS2', 'BL'))) %>%
group_by(algorithm, dataset) %>% summarise(medianKL=median(KL),meanKL=mean(KL)) %>% ungroup() %>%
left_join(all.time, by=c('dataset','algorithm'))
all.kl.time = all.kl.time %>% mutate(d=substr(dataset, 3,3)) %>% mutate(label=paste0(algorithm, d))
label_formated= Map(.a=as.character(all.kl.time$algorithm), .b=all.kl.time$d, f = function(.a,.b) bquote(list(.(.a)^.(.b))))
all.kl.time$label2 = sapply(label_formated, deparse)
ggplot(all.kl.time, aes(x=mean, y=meanKL, col=algorithm,label=label2)) +
scale_x_log10() +
scale_y_log10() +
geom_text(size=3, show.legend = FALSE, parse=TRUE) +
xlab("Running time (seconds) per tree") +
ylab("KL divergence")
```
\newpage
## RMSD of 10 replicates
```{r RMSD_by_method_and_dataset_with_replicates}
all.rmsd$rep = factor(all.rmsd$rep, levels=unique(all.rmsd$rep))
all.rmsd.determ = filter(all.rmsd, algorithm %in% c('ML', 'MAP', 'GL', 'LL', 'BL') & rep==1)
all.rmsd = filter(all.rmsd, !(algorithm %in% c('ML', 'MAP', 'GL', 'LL', 'BL')))
all.rmsd = rbind(all.rmsd, all.rmsd.determ)
myorder = all.rmsd %>% group_by(algorithm) %>% summarize(medianRMSD=median(RMSD),meanRMSD=mean(RMSD)) %>%
arrange(meanRMSD) %>% select(algorithm) %>% unlist(use.names = FALSE) %>% as.vector
all.rmsd$Method = factor(all.rmsd$algorithm, levels=myorder)
legend = final[match(myorder, origin)]
ggplot(all.rmsd, aes(x=Method, y=RMSD,col=dataset)) +#, shape=dataset)) +
theme(legend.position = c(0.9, 0.2),
legend.title=element_blank(), legend.background=element_blank(),
legend.key = element_rect(fill = NA, colour = NA, size = 0.25),
axis.title.x=element_blank(),
axis.text.x = element_text(angle = 30, hjust = 1)) +
geom_hline(yintercept = 0.01) +
geom_hline(yintercept = 0.05, linetype="dashed") +
geom_jitter(width = 0.3, size=1) +
scale_x_discrete(labels=legend) +
scale_colour_manual(name="dataset", values=color_datasets) +
#scale_shape_manual(name="dataset", values=shape_datasets) +
scale_y_log10()
```
\newpage
## KL of 10 replicates
```{r kl_by_method_and_dataset_with_replicates}
all.kl$rep = factor(all.kl$rep, levels=unique(all.kl$rep))
all.kl.determ = filter(all.kl, algorithm %in% c('ML', 'MAP', 'GL', 'LL', 'BL') & rep==1)
all.kl = filter(all.kl, !(algorithm %in% c('ML', 'MAP', 'GL', 'LL', 'BL')))
all.kl = rbind(all.kl, all.kl.determ)
myorder = all.kl %>% group_by(algorithm) %>% summarize(medianKL=median(KL),meanKL=mean(KL)) %>%
arrange(meanKL) %>% select(algorithm) %>% unlist(use.names = FALSE) %>% as.vector
all.kl$Method = factor(all.kl$algorithm, levels=myorder)
legend = final[match(myorder, origin)]
ggplot(all.kl, aes(x=Method, y=KL,col=dataset)) +#, shape=dataset)) +
theme(legend.position = c(0.9, 0.2),
legend.title=element_blank(), legend.background=element_blank(),
legend.key = element_rect(fill = NA, colour = NA, size = 0.25),
axis.title.x=element_blank(),
axis.text.x = element_text(angle = 30, hjust = 1)) +
geom_jitter(width = 0.3, size=1) +
scale_x_discrete(labels=legend) +
scale_colour_manual(name="dataset", values=color_datasets) +
#scale_shape_manual(name="dataset", values=shape_datasets) +
scale_y_log10() +
ylab("KL divergence")
```
## Standard error
```{r marginal-se, fig.height=10, fig.width=10}
margs = all.marginal %>% group_by(dataset,algorithm, tree) %>%
summarize(SE=sd(marginal), mean=mean(marginal),CV=sd(marginal)/mean(marginal)) %>%
filter(SE!=0) %>% as.data.frame
myorder = margs %>% group_by(algorithm) %>% summarize(meanSE=mean(SE)) %>% as.data.frame
margs$Method = factor(margs$algorithm, levels=myorder$algorithm[order(myorder$meanSE,decreasing=F)])
mylabs = final[match(levels(margs$Method), origin)]
ggplot(margs, aes( x=Method, y=SE)) +
theme(axis.title.x=element_blank(),
axis.text.x = element_text(angle = 30, hjust = 1)) +
facet_wrap(~dataset, ncol=1, scales = "free_y") +
geom_boxplot() +
scale_y_log10() +
scale_x_discrete(labels=mylabs) +
ylab("Standard error (log scale)")
```
\newpage
```{r}
plot.posterior.srf <- function(ds, replicate, breaks=NULL){
df.plot = all.plot %>% filter(dataset==ds&rep==replicate) %>% select(-rep)
df.rmsd = all.rmsd %>% filter(dataset==ds&rep==replicate) %>% select(-rep)
df.kl = all.kl %>% filter(dataset==ds&rep==replicate) %>% mutate(algorithm=droplevels(algorithm)) %>% select(-rep)
temp = df.kl %>% full_join(df.rmsd, by=c('algorithm', 'dataset','Method')) %>% arrange(RMSD)
df.plot = df.plot %>% mutate(algorithm=factor(algorithm, levels=temp$algorithm))
origin_ordered = origin[match(temp$algorithm, origin)]
final_ordered = final[match(temp$algorithm, origin)]
label_formated= Map(.o=origin_ordered, .f=final_ordered, .kl=temp$KL, .rmsd=temp$RMSD, f)
levels(df.plot$algorithm) = unlist(label_formated)
p = ggplot(df.plot, aes(x=SRF, y=Posterior)) +
facet_wrap( ~algorithm, scales = "free_y", ncol=4,labeller=label_parsed) +
theme(aspect.ratio = 1,strip.text.x = element_text(size = 9)) +
geom_point(color='#66666670')+
xlab("Sample relative frequency (log scale)") +
ylab("Approximate posterior probability (log scale)")
if(!is.null(breaks))
p = p + scale_x_continuous(breaks = breaks)
print(p)
}
plot.splits <- function(ds, replicate){
df = read.ds(ds)
df.splits = df[['splits']] %>% filter(rep==replicate)
df.rmsd = df[['rmsd']] %>% filter(rep==replicate)
df.kl = df[['kl']] %>% filter(rep==replicate)
df.splits = df.splits %>%
full_join(df.rmsd, by=c('algorithm')) %>%
full_join(df.kl, by=c('algorithm'))
colors = c(rgb(225,198,47,max=255),rgb(102,194,165,max=255),rgb(252,141,98,max=255))
df.splits$color = colors[1]
df.splits[df.splits$RMSD<0.01,]$color = colors[2]
df.splits[df.splits$RMSD>0.05,]$color = colors[3]
df.splits$color = factor(df.splits$color, levels=colors)
temp = df.kl %>% full_join(df.rmsd, by=c('algorithm'))
temp = temp[match(origin,temp$algorithm),]
df.splits = df.splits %>%
mutate(algorithm=factor(algorithm, levels=temp$algorithm[order(temp$RMSD,decreasing=F)]))
label_formated= Map(.o=origin, .f=final, .kl=temp$KL, .rmsd=temp$RMSD, f)
label_formated = label_formated[match(levels(df.splits$algorithm),names(label_formated))]
levels(df.splits$algorithm) = unlist(label_formated)
ggplot(df.splits, aes(x=f, y=fhat, color=color)) +
facet_wrap( ~algorithm, scales = "free_y", ncol=4,labeller=label_parsed) +
theme(aspect.ratio = 1,strip.text.x = element_text(size = 9), legend.position="none") +
geom_point()+
scale_color_manual(values=colors) +
scale_x_continuous(breaks = c(0, 0.5, 1)) +
labs(y="Approximate split posterior probability", x="SRF split posterior probabitlity")
}
```
\newpage
# DS1
## Approximate posterior vs. SRF posteriors of replicate 1
```{r DS1_scatterplot, fig.height=10, fig.width=20}
plot.posterior.srf('DS1', 1, c(-6, -4, -2))
```
## Split posterior probabilities approximate vs. SRF (replicate 1)
```{r DS1_split_probs, fig.height=10, fig.width=20}
plot.splits('DS1', 1)
```
\newpage
# DS2
## Approximate posterior vs. SRF posteriors of replicate 1
```{r DS2_scatterplot, fig.height=10, fig.width=20}
plot.posterior.srf('DS2', 1, c(-3, -2, -1))
```
## Split posterior probabilities approximate vs. SRF (replicate 1)
```{r DS2_split_probs, fig.height=10, fig.width=20}
plot.splits('DS2', 1)
```
\newpage
# DS3
## Approximate posterior vs. SRF posteriors of replicate 1
```{r DS3_scatterplot, fig.height=10, fig.width=20}
plot.posterior.srf('DS3', 1, c(-5, -3, -1))
```
## Split posterior probabilities approximate vs. SRF (replicate 1)
```{r DS3_split_probs, fig.height=10, fig.width=20}
plot.splits('DS3', 1)
```
\newpage
# DS4
## Approximate posterior vs. SRF posteriors of replicate 1
```{r DS4_scatterplot, fig.height=10, fig.width=20}
plot.posterior.srf('DS4', 1)#, c(-8, -6, -4, -2))
```
## Split posterior probabilities approximate vs. SRF (replicate 1)
```{r DS4_split_probs, fig.height=10, fig.width=20}
plot.splits('DS4', 1)
```
\newpage
# DS5
## Approximate posterior vs. SRF posteriors of replicate 1
```{r DS5_scatterplot, fig.height=10, fig.width=20}
plot.posterior.srf('DS5', 1, c(-9, -8, -7))
```
## Split posterior probabilities approximate vs. SRF (replicate 1)
```{r DS5_split_probs, fig.height=10, fig.width=20}
plot.splits('DS5', 1)
```