Switch to unified view

a b/overview/bigdata-mtry-nsplit.R
1
source('../lib/handy.R')
2
requirePlus('ggplot2', 'cowplot')
3
4
# Read in two cross-validation data files
5
cv.performance <-
6
  read.csv('../../output/rf-bigdata-try7-ALL-cv-largemtry-calibration.csv')
7
cv.performance <-
8
  rbind(
9
    cv.performance,
10
    read.csv('../../output/rf-bigdata-try7-ALL-cv-smallmtry-calibration.csv')
11
  )
12
13
# Read in overall model performance
14
models.performance <- readTablePlus('../../output/models-performance.tsv')
15
16
17
18
cv.performance.avg <-
19
  aggregate(
20
    c.index.val ~ n.splits + m.try,
21
    data = cv.performance,
22
    mean
23
  )
24
25
ggplot(cv.performance.avg, aes(x = n.splits, y = c.index.val, colour = factor(m.try), group = m.try)) +
26
  geom_line() +
27
  geom_point(data = cv.performance) +
28
  geom_hline(
29
    yintercept =
30
      models.performance$c.index[models.performance$model == 'rf-varselrf'],
31
    colour = 'grey'
32
  ) +
33
  geom_hline(
34
    yintercept =
35
      models.performance$c.index[models.performance$model == 'rf-varselmiss'],
36
    colour = 'grey'
37
  ) +
38
  coord_cartesian(
39
    ylim = c(0.65, 0.8)
40
  )