• 1 Introduction
    • 1.1 About our supplemental material
    • 1.2 Contributing authors
    • 1.3 Computer Setup
    • 1.4 Experimental setup
  • 2 Truncation selection
    • 2.1 Data setup
    • 2.2 Exploitation rate results
      • 2.2.1 Performance over time
      • 2.2.2 Best performance throughout
      • 2.2.3 Largest valley reached throughout
    • 2.3 Ordered exploitation results
      • 2.3.1 Performance over time
      • 2.3.2 Best performance throughout
      • 2.3.3 Largest valley reached throughout
    • 2.4 Contradictory objectives resutls
      • 2.4.1 Activation gene coverage over time
      • 2.4.2 Final activation gene coverage
      • 2.4.3 Satisfactory trait coverage over time
      • 2.4.4 Final satisfactory trait coverage
      • 2.4.5 Largest valley reached throughout
    • 2.5 Multi-path exploration results
      • 2.5.1 Activation gene coverage over time
      • 2.5.2 Final activation gene coverage
      • 2.5.3 Performance over time
      • 2.5.4 Best performance throughout
      • 2.5.5 Largest valley reached throughout
  • 3 Tournament selection
    • 3.1 Data setup
    • 3.2 Exploitation rate results
      • 3.2.1 Performance over time
      • 3.2.2 Best performance throughout
      • 3.2.3 Largest valley reached throughout
    • 3.3 Ordered exploitation results
      • 3.3.1 Performance over time
      • 3.3.2 Best performance throughout
      • 3.3.3 Largest valley reached throughout
    • 3.4 Contradictory objectives resutls
      • 3.4.1 Activation gene coverage over time
      • 3.4.2 Final activation gene coverage
      • 3.4.3 Satisfactory trait coverage over time
      • 3.4.4 Final satisfactory trait coverage
      • 3.4.5 Largest valley reached throughout
    • 3.5 Multi-path exploration results
      • 3.5.1 Activation gene coverage over time
      • 3.5.2 Final activation gene coverage
      • 3.5.3 Performance over time
      • 3.5.4 Best performance throughout
      • 3.5.5 Largest valley reached throughout
  • 4 Genotypic fitness sharing
    • 4.1 Data setup
    • 4.2 Exploitation rate results
      • 4.2.1 Performance over time
      • 4.2.2 Best performance throughout
      • 4.2.3 Largest valley reached throughout
    • 4.3 Ordered exploitation results
      • 4.3.1 Performance over time
      • 4.3.2 Best performance throughout
      • 4.3.3 Largest valley reached throughout
    • 4.4 Contradictory objectives results
      • 4.4.1 Activation gene coverage over time
      • 4.4.2 Final activation gene coverage
      • 4.4.3 Satisfactory trait coverage over time
      • 4.4.4 Final satisfactory trait coverage
      • 4.4.5 Largest valley reached throughout
    • 4.5 Multi-path exploration results
      • 4.5.1 Activation gene coverage over time
      • 4.5.2 Final activation gene coverage
      • 4.5.3 Performance over time
      • 4.5.4 Best performance throughout
      • 4.5.5 Largest valley reached throughout
  • 5 Phenotypic fitness sharing
    • 5.1 Data setup
    • 5.2 Exploitation rate results
      • 5.2.1 Performance over time
      • 5.2.2 Best performance throughout
      • 5.2.3 Largest valley reached throughout
    • 5.3 Ordered exploitation results
      • 5.3.1 Performance over time
      • 5.3.2 Best performance throughout
      • 5.3.3 Largest valley reached throughout
    • 5.4 Contradictory objectives results
      • 5.4.1 Activation gene coverage over time
      • 5.4.2 Final activation gene coverage
      • 5.4.3 Satisfactory trait coverage over time
      • 5.4.4 Final satisfactory trait coverage
      • 5.4.5 Largest valley reached throughout
    • 5.5 Multi-path exploration results
      • 5.5.1 Activation gene coverage over time
      • 5.5.2 Final activation gene coverage
      • 5.5.3 Performance over time
      • 5.5.4 Best performance throughout
      • 5.5.5 Largest valley reached throughout
  • 6 Nondominated sorting
    • 6.1 Data setup
    • 6.2 Exploitation rate results
      • 6.2.1 Performance over time
      • 6.2.2 Best performance throughout
      • 6.2.3 Largest valley reached throughout
    • 6.3 Ordered exploitation results
      • 6.3.1 Performance over time
      • 6.3.2 Best performance throughout
      • 6.3.3 Largest valley reached throughout
    • 6.4 Contradictory objectives results
      • 6.4.1 Activation gene coverage over time
      • 6.4.2 Final activation gene coverage
      • 6.4.3 Satisfactory trait coverage over time
      • 6.4.4 Final satisfactory trait coverage
      • 6.4.5 Largest valley reached throughout
    • 6.5 Multi-path exploration results
      • 6.5.1 Activation gene coverage over time
      • 6.5.2 Final activation gene coverage
      • 6.5.3 Performance over time
      • 6.5.4 Best performance throughout
      • 6.5.5 Largest valley reached throughout
  • 7 Novelty search
    • 7.1 Data setup
    • 7.2 Exploitation rate results
      • 7.2.1 Performance over time
      • 7.2.2 Best performance throughout
      • 7.2.3 Largest valley reached throughout
    • 7.3 Ordered exploitation results
      • 7.3.1 Performance over time
      • 7.3.2 Best performance throughout
      • 7.3.3 Largest valley reached throughout
    • 7.4 Contradictory objectives results
      • 7.4.1 Activation gene coverage over time
      • 7.4.2 Final activation gene coverage
      • 7.4.3 Satisfactory trait coverage over time
      • 7.4.4 Final satisfactory trait coverage
      • 7.4.5 Largest valley reached throughout
    • 7.5 Multi-path exploration results
      • 7.5.1 Activation gene coverage over time
      • 7.5.2 Final activation gene coverage
      • 7.5.3 Performance over time
      • 7.5.4 Best performance throughout
      • 7.5.5 Largest valley reached throughout
  • References
  • Published with ❤ and bookdown

Supplemental Material: Selection Scheme Parameter Sweep MVC Diagnostics

Chapter 7 Novelty search

Results for the novelty search parameter sweep on the diagnostics with valleys.

7.1 Data setup

over_time_df <- read.csv(paste(DATA_DIR,'OVER-TIME-MVC/nov.csv', sep = "", collapse = NULL), header = TRUE, stringsAsFactors = FALSE)
over_time_df$K <- factor(over_time_df$K, levels = NS_LIST)
over_time_df$uni_str_pos = over_time_df$uni_str_pos + over_time_df$arc_acti_gene - over_time_df$overlap

best_df <- read.csv(paste(DATA_DIR,'BEST-MVC/nov.csv', sep = "", collapse = NULL), header = TRUE, stringsAsFactors = FALSE)
best_df$K <- factor(best_df$K, levels = NS_LIST)

7.2 Exploitation rate results

Here we present the results for best performances found by each selection scheme parameter on the exploitation rate diagnostic with valleys. 50 replicates are conducted for each scheme explored.

7.2.1 Performance over time

Best performance in a population over time. Data points on the graph is the average performance across 50 replicates every 2000 generations. Shading comes from the best and worse performance across 50 replicates.

lines = filter(over_time_df, acro == 'exp') %>%
  group_by(K, gen) %>%
  dplyr::summarise(
    min = min(pop_fit_max) / DIMENSIONALITY,
    mean = mean(pop_fit_max) / DIMENSIONALITY,
    max = max(pop_fit_max) / DIMENSIONALITY
  )
## `summarise()` has grouped output by 'K'. You can override using the `.groups`
## argument.
over_time_plot = ggplot(lines, aes(x=gen, y=mean, group = K, fill = K, color = K, shape = K)) +
  geom_ribbon(aes(ymin = min, ymax = max), alpha = 0.1) +
  geom_line(size = 0.5) +
  geom_point(data = filter(lines, gen %% 2000 == 0 & gen != 0), size = 1.5, stroke = 2.0, alpha = 1.0) +
  scale_y_continuous(
    name="Average trait score",
    limits = c(0,25)
  ) +
  scale_x_continuous(
    name="Generations",
    limits=c(0, 50000),
    breaks=c(0, 10000, 20000, 30000, 40000, 50000),
    labels=c("0e+4", "1e+4", "2e+4", "3e+4", "4e+4", "5e+4")

  ) +
  scale_shape_manual(values=SHAPE)+
  scale_colour_manual(values = cb_palette) +
  scale_fill_manual(values = cb_palette) +
  ggtitle('Performance over time')+
  p_theme +
  guides(
    shape=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors'),
    color=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors'),
    fill=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors')
  )

over_time_plot

7.2.2 Best performance throughout

Best performance reached throughout 50,000 generations in a population.

plot = filter(best_df, acro == 'exp' &  var == 'pop_fit_max') %>%
  ggplot(., aes(x = K, y = val / DIMENSIONALITY, color = K, fill = K, shape = K)) +
  geom_flat_violin(position = position_nudge(x = .1, y = 0), scale = 'width', alpha = 0.2, width = 1.5) +
  geom_boxplot(color = 'black', width = .07, outlier.shape = NA, alpha = 0.0, size = 1.0, position = position_nudge(x = .16, y = 0)) +
  geom_point(position = position_jitter(width = 0.03, height = 0.02), size = 2.0, alpha = 1.0) +
  scale_y_continuous(
    name="Average trait score",
    limits=c(15,22)
  ) +
  scale_x_discrete(
    name="K"
  )+
  scale_shape_manual(values=SHAPE)+
  scale_colour_manual(values = cb_palette, ) +
  scale_fill_manual(values = cb_palette) +
  ggtitle('Best performance throughout')+
  p_theme

plot_grid(
  plot +
    theme(legend.position="none"),
  legend,
  nrow=2,
  rel_heights = c(3,1)
)

7.2.2.1 Stats

Summary statistics for the best performance.

performance = filter(best_df, acro == 'exp' &  var == 'pop_fit_max')
performance$K = factor(performance$K, levels = NS_LIST)
performance %>%
  group_by(K) %>%
  dplyr::summarise(
    count = n(),
    na_cnt = sum(is.na(val)),
    min = min(val / DIMENSIONALITY, na.rm = TRUE),
    median = median(val / DIMENSIONALITY, na.rm = TRUE),
    mean = mean(val / DIMENSIONALITY, na.rm = TRUE),
    max = max(val / DIMENSIONALITY, na.rm = TRUE),
    IQR = IQR(val / DIMENSIONALITY, na.rm = TRUE)
  )
## # A tibble: 6 x 8
##   K     count na_cnt   min median  mean   max   IQR
##   <fct> <int>  <int> <dbl>  <dbl> <dbl> <dbl> <dbl>
## 1 1        50      0  15.8   18.2  18.0  19.7 1.30 
## 2 2        50      0  16.3   18.5  18.5  20.4 1.30 
## 3 4        50      0  17.3   18.9  18.9  20.9 1.09 
## 4 8        50      0  17.1   18.7  18.8  20.7 1.24 
## 5 15       50      0  16.5   18.7  18.7  21.7 1.45 
## 6 30       50      0  16.6   18.3  18.4  21.6 0.965

Kruskal–Wallis test illustrates evidence of statistical differences.

kruskal.test(val ~ K, data = performance)
## 
##  Kruskal-Wallis rank sum test
## 
## data:  val by K
## Kruskal-Wallis chi-squared = 27.662, df = 5, p-value = 4.237e-05

Results for post-hoc Wilcoxon rank-sum test with a Bonferroni correction.

pairwise.wilcox.test(x = performance$val, g = performance$K, p.adjust.method = "bonferroni",
                     paired = FALSE, conf.int = FALSE, alternative = 't')
## 
##  Pairwise comparisons using Wilcoxon rank sum test with continuity correction 
## 
## data:  performance$val and performance$K 
## 
##    1       2       4       8       15     
## 2  0.19048 -       -       -       -      
## 4  0.00014 0.65631 -       -       -      
## 8  0.00204 1.00000 1.00000 -       -      
## 15 0.02198 1.00000 1.00000 1.00000 -      
## 30 0.91878 1.00000 0.03427 0.17619 1.00000
## 
## P value adjustment method: bonferroni

7.2.3 Largest valley reached throughout

The largest valley reached in a single trait throughout an entire evolutionary run. To collect this value, we look through all the best-performing solutions each generation and find the largest valley reached.

plot = filter(best_df, acro == 'exp' & var == 'ele_big_peak') %>%
  ggplot(., aes(x = K, y = val, color = K, fill = K, shape = K)) +
  geom_flat_violin(position = position_nudge(x = .1, y = 0), scale = 'width', alpha = 0.2, width = 1.5) +
  geom_boxplot(color = 'black', width = .07, outlier.shape = NA, alpha = 0.0, size = 1.0, position = position_nudge(x = .16, y = 0)) +
  geom_point(position = position_jitter(width = 0.03, height = 0.02), size = 2.0, alpha = 1.0) +
  scale_y_continuous(
    name="Valley reached",
    limits=c(9.9,13.1),
    breaks = c(10,11,12,13)
  ) +
  scale_x_discrete(
    name="K"
  )+
  scale_shape_manual(values=SHAPE)+
  scale_colour_manual(values = cb_palette, ) +
  scale_fill_manual(values = cb_palette) +
  ggtitle('Largest valley reached')+
  p_theme

plot_grid(
  plot +
    theme(legend.position="none"),
  legend,
  nrow=2,
  rel_heights = c(3,1)
)

7.2.3.1 Stats

Summary statistics for the largest valley crossed.

valleys = filter(best_df, acro == 'exp' & var == 'ele_big_peak')
valleys$K = factor(valleys$K, levels = NS_LIST)
valleys %>%
  group_by(K) %>%
  dplyr::summarise(
    count = n(),
    na_cnt = sum(is.na(val)),
    min = min(val, na.rm = TRUE),
    median = median(val, na.rm = TRUE),
    mean = mean(val, na.rm = TRUE),
    max = max(val, na.rm = TRUE),
    IQR = IQR(val, na.rm = TRUE)
  )
## # A tibble: 6 x 8
##   K     count na_cnt   min median  mean   max   IQR
##   <fct> <int>  <int> <dbl>  <dbl> <dbl> <dbl> <dbl>
## 1 1        50      0    10     11  11.0    13  0   
## 2 2        50      0    10     11  10.8    12  0.75
## 3 4        50      0    10     10  10.4    11  1   
## 4 8        50      0    10     10  10.4    12  1   
## 5 15       50      0    10     11  10.6    11  1   
## 6 30       50      0    10     11  10.7    12  1

Kruskal–Wallis test illustrates evidence of statistical differences.

kruskal.test(val ~ K, data = valleys)
## 
##  Kruskal-Wallis rank sum test
## 
## data:  val by K
## Kruskal-Wallis chi-squared = 36.731, df = 5, p-value = 6.781e-07

Results for post-hoc Wilcoxon rank-sum test with a Bonferroni correction.

pairwise.wilcox.test(x = valleys$val, g = valleys$K, p.adjust.method = "bonferroni",
                     paired = FALSE, conf.int = FALSE, alternative = 't')
## 
##  Pairwise comparisons using Wilcoxon rank sum test with continuity correction 
## 
## data:  valleys$val and valleys$K 
## 
##    1       2       4       8       15     
## 2  1.00000 -       -       -       -      
## 4  0.00019 0.00612 -       -       -      
## 8  0.00020 0.00596 1.00000 -       -      
## 15 0.00946 0.27532 1.00000 1.00000 -      
## 30 0.14860 1.00000 0.20761 0.18174 1.00000
## 
## P value adjustment method: bonferroni

7.3 Ordered exploitation results

Here we present the results for best performances found by each selection scheme parameter on the ordered exploitation diagnostic with valleys. 50 replicates are conducted for each scheme explored.

7.3.1 Performance over time

Best performance in a population over time. Data points on the graph is the average performance across 50 replicates every 2000 generations. Shading comes from the best and worse performance across 50 replicates.

lines = filter(over_time_df, acro == 'ord') %>%
  group_by(K, gen) %>%
  dplyr::summarise(
    min = min(pop_fit_max) / DIMENSIONALITY,
    mean = mean(pop_fit_max) / DIMENSIONALITY,
    max = max(pop_fit_max) / DIMENSIONALITY
  )
## `summarise()` has grouped output by 'K'. You can override using the `.groups`
## argument.
over_time_plot = ggplot(lines, aes(x=gen, y=mean, group = K, fill = K, color = K, shape = K)) +
  geom_ribbon(aes(ymin = min, ymax = max), alpha = 0.1) +
  geom_line(size = 0.5) +
  geom_point(data = filter(lines, gen %% 2000 == 0 & gen != 0), size = 1.5, stroke = 2.0, alpha = 1.0) +
  scale_y_continuous(
    name="Average trait score",
    limits = c(0,7)
  ) +
  scale_x_continuous(
    name="Generations",
    limits=c(0, 50000),
    breaks=c(0, 10000, 20000, 30000, 40000, 50000),
    labels=c("0e+4", "1e+4", "2e+4", "3e+4", "4e+4", "5e+4")

  ) +
  scale_shape_manual(values=SHAPE)+
  scale_colour_manual(values = cb_palette) +
  scale_fill_manual(values = cb_palette) +
  ggtitle('Performance over time')+
  p_theme +
  guides(
    shape=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors'),
    color=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors'),
    fill=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors')
  )

over_time_plot

7.3.2 Best performance throughout

Best performance reached throughout 50,000 generations in a population.

plot = filter(best_df, acro == 'ord' &  var == 'pop_fit_max') %>%
  ggplot(., aes(x = K, y = val / DIMENSIONALITY, color = K, fill = K, shape = K)) +
  geom_flat_violin(position = position_nudge(x = .1, y = 0), scale = 'width', alpha = 0.2, width = 1.5) +
  geom_boxplot(color = 'black', width = .07, outlier.shape = NA, alpha = 0.0, size = 1.0, position = position_nudge(x = .16, y = 0)) +
  geom_point(position = position_jitter(width = 0.03, height = 0.02), size = 2.0, alpha = 1.0) +
  scale_y_continuous(
    name="Average trait score",
    limits=c(0,7)
  ) +
  scale_x_discrete(
    name="K"
  )+
  scale_shape_manual(values=SHAPE)+
  scale_colour_manual(values = cb_palette, ) +
  scale_fill_manual(values = cb_palette) +
  ggtitle('Best performance throughout')+
  p_theme

plot_grid(
  plot +
    theme(legend.position="none"),
  legend,
  nrow=2,
  rel_heights = c(3,1)
)

7.3.2.1 Stats

Summary statistics for the best performance.

performance = filter(best_df, acro == 'ord' &  var == 'pop_fit_max')
performance$K = factor(performance$K, levels = NS_LIST)
performance %>%
  group_by(K) %>%
  dplyr::summarise(
    count = n(),
    na_cnt = sum(is.na(val)),
    min = min(val / DIMENSIONALITY, na.rm = TRUE),
    median = median(val / DIMENSIONALITY, na.rm = TRUE),
    mean = mean(val / DIMENSIONALITY, na.rm = TRUE),
    max = max(val / DIMENSIONALITY, na.rm = TRUE),
    IQR = IQR(val / DIMENSIONALITY, na.rm = TRUE)
  )
## # A tibble: 6 x 8
##   K     count na_cnt   min median  mean   max   IQR
##   <fct> <int>  <int> <dbl>  <dbl> <dbl> <dbl> <dbl>
## 1 1        50      0  1.83   3.71  3.65  5.17 0.827
## 2 2        50      0  3.05   4.28  4.28  5.52 0.682
## 3 4        50      0  3.02   4.06  4.19  5.62 0.758
## 4 8        50      0  2.12   3.44  3.47  4.64 0.625
## 5 15       50      0  2.97   3.70  3.77  4.83 0.525
## 6 30       50      0  3.63   5.02  4.98  6.35 0.575

Kruskal–Wallis test illustrates evidence of statistical differences.

kruskal.test(val ~ K, data = performance)
## 
##  Kruskal-Wallis rank sum test
## 
## data:  val by K
## Kruskal-Wallis chi-squared = 134.98, df = 5, p-value < 2.2e-16

Results for post-hoc Wilcoxon rank-sum test with a Bonferroni correction.

pairwise.wilcox.test(x = performance$val, g = performance$K, p.adjust.method = "bonferroni",
                     paired = FALSE, conf.int = FALSE, alternative = 't')
## 
##  Pairwise comparisons using Wilcoxon rank sum test with continuity correction 
## 
## data:  performance$val and performance$K 
## 
##    1       2       4       8       15     
## 2  2.7e-05 -       -       -       -      
## 4  0.0016  1.0000  -       -       -      
## 8  1.0000  1.8e-09 4.4e-07 -       -      
## 15 1.0000  1.1e-05 0.0038  0.0195  -      
## 30 6.8e-13 1.7e-07 3.2e-07 2.5e-15 8.8e-14
## 
## P value adjustment method: bonferroni

7.3.3 Largest valley reached throughout

The largest valley reached in a single trait throughout an entire evolutionary run. To collect this value, we look through all the best-performing solutions each generation and find the largest valley reached.

plot = filter(best_df, acro == 'ord' & var == 'ele_big_peak') %>%
  ggplot(., aes(x = K, y = val, color = K, fill = K, shape = K)) +
  geom_flat_violin(position = position_nudge(x = .1, y = 0), scale = 'width', alpha = 0.2, width = 1.5) +
  geom_boxplot(color = 'black', width = .07, outlier.shape = NA, alpha = 0.0, size = 1.0, position = position_nudge(x = .16, y = 0)) +
  geom_point(position = position_jitter(width = 0.03, height = 0.02), size = 2.0, alpha = 1.0) +
  scale_y_continuous(
    name="Valley reached",
    limits=c(8.9,14.1),
    breaks = c(9,10,11,12,13,14)
  ) +
  scale_x_discrete(
    name="K"
  )+
  scale_shape_manual(values=SHAPE)+
  scale_colour_manual(values = cb_palette, ) +
  scale_fill_manual(values = cb_palette) +
  ggtitle('Largest valley reached')+
  p_theme

plot_grid(
  plot +
    theme(legend.position="none"),
  legend,
  nrow=2,
  rel_heights = c(3,1)
)

7.3.3.1 Stats

Summary statistics for the largest valley crossed.

valleys = filter(best_df, acro == 'ord' & var == 'ele_big_peak')
valleys$K = factor(valleys$K, levels = NS_LIST)
valleys %>%
  group_by(K) %>%
  dplyr::summarise(
    count = n(),
    na_cnt = sum(is.na(val)),
    min = min(val, na.rm = TRUE),
    median = median(val, na.rm = TRUE),
    mean = mean(val, na.rm = TRUE),
    max = max(val, na.rm = TRUE),
    IQR = IQR(val, na.rm = TRUE)
  )
## # A tibble: 6 x 8
##   K     count na_cnt   min median  mean   max   IQR
##   <fct> <int>  <int> <dbl>  <dbl> <dbl> <dbl> <dbl>
## 1 1        50      0    10   12    12.3    14     1
## 2 2        50      0    11   12    12.5    14     1
## 3 4        50      0    10   11.5  11.5    13     1
## 4 8        50      0     9   11    10.7    13     1
## 5 15       50      0    10   10    10.4    13     1
## 6 30       50      0     9   11    10.7    12     1

Kruskal–Wallis test illustrates evidence of statistical differences.

kruskal.test(val ~ K, data = valleys)
## 
##  Kruskal-Wallis rank sum test
## 
## data:  val by K
## Kruskal-Wallis chi-squared = 162.64, df = 5, p-value < 2.2e-16

Results for post-hoc Wilcoxon rank-sum test with a Bonferroni correction.

pairwise.wilcox.test(x = valleys$val, g = valleys$K, p.adjust.method = "bonferroni",
                     paired = FALSE, conf.int = FALSE, alternative = 't')
## 
##  Pairwise comparisons using Wilcoxon rank sum test with continuity correction 
## 
## data:  valleys$val and valleys$K 
## 
##    1       2       4       8       15     
## 2  1.00000 -       -       -       -      
## 4  0.00118 3.1e-06 -       -       -      
## 8  1.4e-11 3.4e-14 3.8e-05 -       -      
## 15 7.6e-14 8.6e-16 2.0e-08 0.61124 -      
## 30 2.0e-11 2.5e-14 0.00017 1.00000 0.07759
## 
## P value adjustment method: bonferroni

7.4 Contradictory objectives results

Here we present the results for activation gene coverage and satisfactory trait coverage found by each selection scheme parameter on the contradictory objectives diagnostic with valleys. 50 replicates are conducted for each scheme parameters explored.

7.4.1 Activation gene coverage over time

Activation gene coverage in a population over time. Data points on the graph is the average activation gene coverage across 50 replicates every 2000 generations. Shading comes from the best and worse coverage across 50 replicates.

lines = filter(over_time_df, acro == 'con')  %>%
  group_by(K, gen) %>%
  dplyr::summarise(
    min = min(uni_str_pos),
    mean = mean(uni_str_pos),
    max = max(uni_str_pos)
  )
## `summarise()` has grouped output by 'K'. You can override using the `.groups`
## argument.
ggplot(lines, aes(x=gen, y=mean, group = K, fill = K, color = K, shape = K)) +
  geom_ribbon(aes(ymin = min, ymax = max), alpha = 0.1) +
  geom_line(size = 0.5) +
  geom_point(data = filter(lines, gen %% 2000 == 0 & gen != 0), size = 1.5, stroke = 2.0, alpha = 1.0) +
  scale_y_continuous(
    name="Coverage",
    limits=c(0, 100),
    breaks=seq(0,100, 20),
    labels=c("0", "20", "40", "60", "80", "100")
  ) +
  scale_x_continuous(
    name="Generations",
    limits=c(0, 50000),
    breaks=c(0, 10000, 20000, 30000, 40000, 50000),
    labels=c("0e+4", "1e+4", "2e+4", "3e+4", "4e+4", "5e+4")

  ) +
  scale_shape_manual(values=SHAPE)+
  scale_colour_manual(values = cb_palette) +
  scale_fill_manual(values = cb_palette) +
  ggtitle('Activation gene coverage over time')+
  p_theme +
  guides(
    shape=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors'),
    color=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors'),
    fill=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors')
  )

7.4.2 Final activation gene coverage

Activation gene coverage found in the final population at 50,000 generations.

plot = filter(over_time_df, gen == 50000 & acro == 'con') %>%
  ggplot(., aes(x = K, y = uni_str_pos, color = K, fill = K, shape = K)) +
  geom_flat_violin(position = position_nudge(x = .1, y = 0), scale = 'width', alpha = 0.2, width = 1.5) +
  geom_boxplot(color = 'black', width = .07, outlier.shape = NA, alpha = 0.0, size = 1.0, position = position_nudge(x = .16, y = 0)) +
  geom_point(position = position_jitter(width = 0.03, height = 0.02), size = 2.0, alpha = 1.0) +
  scale_y_continuous(
    name="Coverage",
    limits=c(60,100.1)
  ) +
  scale_x_discrete(
    name="K"
  )+
  scale_shape_manual(values=SHAPE)+
  scale_colour_manual(values = cb_palette, ) +
  scale_fill_manual(values = cb_palette) +
  ggtitle('Final activation gene coverage')+
  p_theme

plot_grid(
  plot +
    theme(legend.position="none"),
  legend,
  nrow=2,
  rel_heights = c(3,1)
)

7.4.2.1 Stats

Summary statistics for the generation a satisfactory solution is found.

act_coverage = filter(over_time_df, gen == 50000 & acro == 'con')
act_coverage$K = factor(act_coverage$K, levels = NS_LIST)
act_coverage %>%
  group_by(K) %>%
  dplyr::summarise(
    count = n(),
    na_cnt = sum(is.na(uni_str_pos)),
    min = min(uni_str_pos, na.rm = TRUE),
    median = median(uni_str_pos, na.rm = TRUE),
    mean = mean(uni_str_pos, na.rm = TRUE),
    max = max(uni_str_pos, na.rm = TRUE),
    IQR = IQR(uni_str_pos, na.rm = TRUE)
  )
## # A tibble: 6 x 8
##   K     count na_cnt   min median  mean   max   IQR
##   <fct> <int>  <int> <int>  <dbl> <dbl> <int> <dbl>
## 1 1        50      0    67     82  80.9    90   7.5
## 2 2        50      0    85     95  94.5   100   4  
## 3 4        50      0    98    100  99.7   100   0  
## 4 8        50      0    97    100  99.7   100   0  
## 5 15       50      0    99    100  99.9   100   0  
## 6 30       50      0    85     94  93.3    98   3

Kruskal–Wallis test illustrates evidence of statistical differences.

kruskal.test(uni_str_pos ~ K, data = act_coverage)
## 
##  Kruskal-Wallis rank sum test
## 
## data:  uni_str_pos by K
## Kruskal-Wallis chi-squared = 262.41, df = 5, p-value < 2.2e-16

Results for post-hoc Wilcoxon rank-sum test with a Bonferroni correction.

pairwise.wilcox.test(x = act_coverage$uni_str_pos, g = act_coverage$K, p.adjust.method = "bonferroni",
                     paired = FALSE, conf.int = FALSE, alternative = 't')
## 
##  Pairwise comparisons using Wilcoxon rank sum test with continuity correction 
## 
## data:  act_coverage$uni_str_pos and act_coverage$K 
## 
##    1       2       4       8       15     
## 2  5.6e-16 -       -       -       -      
## 4  < 2e-16 7.3e-16 -       -       -      
## 8  < 2e-16 8.5e-16 1.00    -       -      
## 15 < 2e-16 < 2e-16 0.17    0.31    -      
## 30 5.1e-16 0.42    < 2e-16 < 2e-16 < 2e-16
## 
## P value adjustment method: bonferroni

7.4.3 Satisfactory trait coverage over time

Satisfactory trait coverage in a population over time. Data points on the graph is the average activation gene coverage across 50 replicates every 2000 generations. Shading comes from the best and worse coverage across 50 replicates.

lines = filter(over_time_df, acro == 'con')  %>%
  group_by(K, gen) %>%
  dplyr::summarise(
    min = min(pop_uni_obj),
    mean = mean(pop_uni_obj),
    max = max(pop_uni_obj)
  )
## `summarise()` has grouped output by 'K'. You can override using the `.groups`
## argument.
ggplot(lines, aes(x=gen, y=mean, group = K, fill = K, color = K, shape = K)) +
  geom_ribbon(aes(ymin = min, ymax = max), alpha = 0.1) +
  geom_line(size = 0.5) +
  geom_point(data = filter(lines, gen %% 2000 == 0 & gen != 0), size = 1.5, stroke = 2.0, alpha = 1.0) +
  scale_y_continuous(
    name="Coverage",
    limits=c(0, 2)
  ) +
  scale_x_continuous(
    name="Generations",
    limits=c(0, 50000),
    breaks=c(0, 10000, 20000, 30000, 40000, 50000),
    labels=c("0e+4", "1e+4", "2e+4", "3e+4", "4e+4", "5e+4")

  ) +
  scale_shape_manual(values=SHAPE)+
  scale_colour_manual(values = cb_palette) +
  scale_fill_manual(values = cb_palette) +
  ggtitle('Satisfactory trait coverage over time')+
  p_theme +
  guides(
    shape=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors'),
    color=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors'),
    fill=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors')
  )

7.4.4 Final satisfactory trait coverage

Satisfactory trait coverage found in the final population at 50,000 generations.

plot = filter(over_time_df, gen == 50000 & acro == 'con') %>%
  ggplot(., aes(x = K, y = pop_uni_obj, color = K, fill = K, shape = K)) +
  geom_flat_violin(position = position_nudge(x = .1, y = 0), scale = 'width', alpha = 0.2, width = 1.5) +
  geom_boxplot(color = 'black', width = .07, outlier.shape = NA, alpha = 0.0, size = 1.0, position = position_nudge(x = .16, y = 0)) +
  geom_point(position = position_jitter(width = 0.03, height = 0.02), size = 2.0, alpha = 1.0) +
  scale_y_continuous(
    name="Coverage",
    limits=c(-0.1, 2)
  ) +
  scale_x_discrete(
    name="K"
  )+
  scale_shape_manual(values=SHAPE)+
  scale_colour_manual(values = cb_palette, ) +
  scale_fill_manual(values = cb_palette) +
  ggtitle('Final satisfactory trait coverage')+
  p_theme

plot_grid(
  plot +
    theme(legend.position="none"),
  legend,
  nrow=2,
  rel_heights = c(3,1)
)

7.4.4.1 Stats

Summary statistics for the generation a satisfactory solution is found.

sat_coverage = filter(over_time_df, gen == 50000 & acro == 'con')
sat_coverage$K = factor(sat_coverage$K, levels = NS_LIST)
sat_coverage %>%
  group_by(K) %>%
  dplyr::summarise(
    count = n(),
    na_cnt = sum(is.na(pop_uni_obj)),
    min = min(pop_uni_obj, na.rm = TRUE),
    median = median(pop_uni_obj, na.rm = TRUE),
    mean = mean(pop_uni_obj, na.rm = TRUE),
    max = max(pop_uni_obj, na.rm = TRUE),
    IQR = IQR(pop_uni_obj, na.rm = TRUE)
  )
## # A tibble: 6 x 8
##   K     count na_cnt   min median  mean   max   IQR
##   <fct> <int>  <int> <int>  <dbl> <dbl> <int> <dbl>
## 1 1        50      0     0      0  0.02     1     0
## 2 2        50      0     0      0  0        0     0
## 3 4        50      0     0      0  0        0     0
## 4 8        50      0     0      0  0        0     0
## 5 15       50      0     0      0  0        0     0
## 6 30       50      0     0      0  0        0     0

Kruskal–Wallis test illustrates evidence of no statistical differences.

kruskal.test(pop_uni_obj ~ K, data = sat_coverage)
## 
##  Kruskal-Wallis rank sum test
## 
## data:  pop_uni_obj by K
## Kruskal-Wallis chi-squared = 5, df = 5, p-value = 0.4159

7.4.5 Largest valley reached throughout

The largest valley reached in a single trait throughout an entire evolutionary run. To collect this value, we look through all the best-performing solutions each generation and find the largest valley reached.

plot = filter(best_df, acro == 'con' & var == 'ele_big_peak') %>%
  ggplot(., aes(x = K, y = val, color = K, fill = K, shape = K)) +
  geom_flat_violin(position = position_nudge(x = .1, y = 0), scale = 'width', alpha = 0.2, width = 1.5) +
  geom_boxplot(color = 'black', width = .07, outlier.shape = NA, alpha = 0.0, size = 1.0, position = position_nudge(x = .16, y = 0)) +
  geom_point(position = position_jitter(width = 0.03, height = 0.02), size = 2.0, alpha = 1.0) +
  scale_y_continuous(
    name="Valley reached",
    limits=c(5.9,14.1),
    breaks=c(6,8,10,12,14)
  ) +
  scale_x_discrete(
    name="K"
  )+
  scale_shape_manual(values=SHAPE)+
  scale_colour_manual(values = cb_palette, ) +
  scale_fill_manual(values = cb_palette) +
  ggtitle('Largest valley reached')+
  p_theme

plot_grid(
  plot +
    theme(legend.position="none"),
  legend,
  nrow=2,
  rel_heights = c(3,1)
)

7.4.5.1 Stats

Summary statistics for the largest valley crossed.

valleys = filter(best_df, acro == 'con' & var == 'ele_big_peak')
valleys$K = factor(valleys$K, levels = NS_LIST)
valleys %>%
  group_by(K) %>%
  dplyr::summarise(
    count = n(),
    na_cnt = sum(is.na(val)),
    min = min(val, na.rm = TRUE),
    median = median(val, na.rm = TRUE),
    mean = mean(val, na.rm = TRUE),
    max = max(val, na.rm = TRUE),
    IQR = IQR(val, na.rm = TRUE)
  )
## # A tibble: 6 x 8
##   K     count na_cnt   min median  mean   max   IQR
##   <fct> <int>  <int> <dbl>  <dbl> <dbl> <dbl> <dbl>
## 1 1        50      0    10   11.5 11.6     14     1
## 2 2        50      0     9   10    9.92    11     0
## 3 4        50      0     7    8    8.22     9     0
## 4 8        50      0     7    8    7.8      9     0
## 5 15       50      0     6    6    6.04     7     0
## 6 30       50      0     7    8    7.88     9     0

Kruskal–Wallis test illustrates evidence of statistical differences.

kruskal.test(val ~ K, data = valleys)
## 
##  Kruskal-Wallis rank sum test
## 
## data:  val by K
## Kruskal-Wallis chi-squared = 273.17, df = 5, p-value < 2.2e-16

Results for post-hoc Wilcoxon rank-sum test with a Bonferroni correction.

pairwise.wilcox.test(x = valleys$val, g = valleys$K, p.adjust.method = "bonferroni",
                     paired = FALSE, conf.int = FALSE, alternative = 't')
## 
##  Pairwise comparisons using Wilcoxon rank sum test with continuity correction 
## 
## data:  valleys$val and valleys$K 
## 
##    1       2       4       8       15     
## 2  3.3e-13 -       -       -       -      
## 4  < 2e-16 < 2e-16 -       -       -      
## 8  < 2e-16 < 2e-16 0.00089 -       -      
## 15 < 2e-16 < 2e-16 < 2e-16 < 2e-16 -      
## 30 < 2e-16 < 2e-16 0.00301 1.00000 < 2e-16
## 
## P value adjustment method: bonferroni

7.5 Multi-path exploration results

Here we present the results for best performances and activation gene coverage found by each selection scheme parameter on the multi-path exploration diagnostic with valleys. 50 replicates are conducted for each scheme parameter explored.

7.5.1 Activation gene coverage over time

Activation gene coverage in a population over time. Data points on the graph is the average activation gene coverage across 50 replicates every 2000 generations. Shading comes from the best and worse coverage across 50 replicates.

lines = filter(over_time_df, acro == 'mpe')  %>%
  group_by(K, gen) %>%
  dplyr::summarise(
    min = min(uni_str_pos),
    mean = mean(uni_str_pos),
    max = max(uni_str_pos)
  )
## `summarise()` has grouped output by 'K'. You can override using the `.groups`
## argument.
ggplot(lines, aes(x=gen, y=mean, group = K, fill = K, color = K, shape = K)) +
  geom_ribbon(aes(ymin = min, ymax = max), alpha = 0.1) +
  geom_line(size = 0.5) +
  geom_point(data = filter(lines, gen %% 2000 == 0 & gen != 0), size = 1.5, stroke = 2.0, alpha = 1.0) +
  scale_y_continuous(
    name="Coverage",
    limits=c(0, 100),
    breaks=seq(0,100, 20),
    labels=c("0", "20", "40", "60", "80", "100")
  ) +
  scale_x_continuous(
    name="Generations",
    limits=c(0, 50000),
    breaks=c(0, 10000, 20000, 30000, 40000, 50000),
    labels=c("0e+4", "1e+4", "2e+4", "3e+4", "4e+4", "5e+4")

  ) +
  scale_shape_manual(values=SHAPE)+
  scale_colour_manual(values = cb_palette) +
  scale_fill_manual(values = cb_palette) +
  ggtitle('Activation gene coverage over time')+
  p_theme +
  guides(
    shape=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors'),
    color=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors'),
    fill=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors')
  )

7.5.2 Final activation gene coverage

Activation gene coverage found in the final population at 50,000 generations.

plot = filter(over_time_df, gen == 50000 & acro == 'mpe') %>%
  ggplot(., aes(x = K, y = uni_str_pos, color = K, fill = K, shape = K)) +
  geom_flat_violin(position = position_nudge(x = .1, y = 0), scale = 'width', alpha = 0.2, width = 1.5) +
  geom_boxplot(color = 'black', width = .07, outlier.shape = NA, alpha = 0.0, size = 1.0, position = position_nudge(x = .16, y = 0)) +
  geom_point(position = position_jitter(width = 0.03, height = 0.02), size = 2.0, alpha = 1.0) +
  scale_y_continuous(
    name="Coverage",
    limits=c(40, 100)
  ) +
  scale_x_discrete(
    name="K"
  )+
  scale_shape_manual(values=SHAPE)+
  scale_colour_manual(values = cb_palette, ) +
  scale_fill_manual(values = cb_palette) +
  ggtitle('Final activation gene coverage')+
  p_theme

plot_grid(
  plot +
    theme(legend.position="none"),
  legend,
  nrow=2,
  rel_heights = c(3,1)
)

7.5.2.1 Stats

Summary statistics for the generation a satisfactory solution is found.

act_coverage = filter(over_time_df, gen == 50000 & acro == 'mpe')
act_coverage$K = factor(act_coverage$K, levels = NS_LIST)
act_coverage %>%
  group_by(K) %>%
  dplyr::summarise(
    count = n(),
    na_cnt = sum(is.na(uni_str_pos)),
    min = min(uni_str_pos, na.rm = TRUE),
    median = median(uni_str_pos, na.rm = TRUE),
    mean = mean(uni_str_pos, na.rm = TRUE),
    max = max(uni_str_pos, na.rm = TRUE),
    IQR = IQR(uni_str_pos, na.rm = TRUE)
  )
## # A tibble: 6 x 8
##   K     count na_cnt   min median  mean   max   IQR
##   <fct> <int>  <int> <int>  <dbl> <dbl> <int> <dbl>
## 1 1        50      0    53   69.5  67.9    86 13.5 
## 2 2        50      0    55   76.5  73.8    89 11.8 
## 3 4        50      0    67   85    84.5    96  9.75
## 4 8        50      0    74   88    87.3    97  5.75
## 5 15       50      0    68   80    80.1    89  6   
## 6 30       50      0    50   67    66.1    78  9.75

Kruskal–Wallis test illustrates evidence of statistical differences.

kruskal.test(uni_str_pos ~ K, data = act_coverage)
## 
##  Kruskal-Wallis rank sum test
## 
## data:  uni_str_pos by K
## Kruskal-Wallis chi-squared = 186.99, df = 5, p-value < 2.2e-16

Results for post-hoc Wilcoxon rank-sum test with a Bonferroni correction.

pairwise.wilcox.test(x = act_coverage$uni_str_pos, g = act_coverage$K, p.adjust.method = "bonferroni",
                     paired = FALSE, conf.int = FALSE, alternative = 't')
## 
##  Pairwise comparisons using Wilcoxon rank sum test with continuity correction 
## 
## data:  act_coverage$uni_str_pos and act_coverage$K 
## 
##    1       2       4       8       15     
## 2  0.00498 -       -       -       -      
## 4  5.1e-13 2.1e-08 -       -       -      
## 8  2.7e-15 2.0e-12 0.55005 -       -      
## 15 1.8e-11 0.00017 0.00300 7.0e-09 -      
## 30 1.00000 4.6e-05 8.7e-15 3.1e-16 2.5e-14
## 
## P value adjustment method: bonferroni

7.5.3 Performance over time

Best performance in a population over time. Data points on the graph is the average performance across 50 replicates every 2000 generations. Shading comes from the best and worse performance across 50 replicates.

lines = filter(over_time_df, acro == 'mpe') %>%
  group_by(K, gen) %>%
  dplyr::summarise(
    min = min(pop_fit_max) / DIMENSIONALITY,
    mean = mean(pop_fit_max) / DIMENSIONALITY,
    max = max(pop_fit_max) / DIMENSIONALITY
  )
## `summarise()` has grouped output by 'K'. You can override using the `.groups`
## argument.
over_time_plot = ggplot(lines, aes(x=gen, y=mean, group = K, fill = K, color = K, shape = K)) +
  geom_ribbon(aes(ymin = min, ymax = max), alpha = 0.1) +
  geom_line(size = 0.5) +
  geom_point(data = filter(lines, gen %% 2000 == 0 & gen != 0), size = 1.5, stroke = 2.0, alpha = 1.0) +
  scale_y_continuous(
    name="Average trait score",
    limits=c(0, 7)
  ) +
  scale_x_continuous(
    name="Generations",
    limits=c(0, 50000),
    breaks=c(0, 10000, 20000, 30000, 40000, 50000),
    labels=c("0e+4", "1e+4", "2e+4", "3e+4", "4e+4", "5e+4")

  ) +
  scale_shape_manual(values=SHAPE)+
  scale_colour_manual(values = cb_palette) +
  scale_fill_manual(values = cb_palette) +
  ggtitle('Performance over time')+
  p_theme +
  guides(
    shape=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors'),
    color=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors'),
    fill=guide_legend(nrow=1, title.position = "left", title = 'K-nearest \nNeighbors')
  )

over_time_plot

7.5.4 Best performance throughout

Best performance reached throughout 50,000 generations in a population.

plot = filter(best_df, acro == 'mpe' &  var == 'pop_fit_max') %>%
  ggplot(., aes(x = K, y = val / DIMENSIONALITY, color = K, fill = K, shape = K)) +
  geom_flat_violin(position = position_nudge(x = .1, y = 0), scale = 'width', alpha = 0.2, width = 1.5) +
  geom_boxplot(color = 'black', width = .07, outlier.shape = NA, alpha = 0.0, size = 1.0, position = position_nudge(x = .16, y = 0)) +
  geom_point(position = position_jitter(width = 0.03, height = 0.02), size = 2.0, alpha = 1.0) +
  scale_y_continuous(
    name="Average trait score",
    limits=c(0,7)
  ) +
  scale_x_discrete(
    name="K"
  )+
  scale_shape_manual(values=SHAPE)+
  scale_colour_manual(values = cb_palette, ) +
  scale_fill_manual(values = cb_palette) +
  ggtitle('Best performance throughout')+
  p_theme

plot_grid(
  plot +
    theme(legend.position="none"),
  legend,
  nrow=2,
  rel_heights = c(3,1)
)

7.5.4.1 Stats

Summary statistics for the best performance.

performance = filter(best_df, acro == 'mpe' &  var == 'pop_fit_max')
performance$K = factor(performance$K, levels = NS_LIST)
performance %>%
  group_by(K) %>%
  dplyr::summarise(
    count = n(),
    na_cnt = sum(is.na(val)),
    min = min(val / DIMENSIONALITY, na.rm = TRUE),
    median = median(val / DIMENSIONALITY, na.rm = TRUE),
    mean = mean(val / DIMENSIONALITY, na.rm = TRUE),
    max = max(val / DIMENSIONALITY, na.rm = TRUE),
    IQR = IQR(val / DIMENSIONALITY, na.rm = TRUE)
  )
## # A tibble: 6 x 8
##   K     count na_cnt   min median  mean   max   IQR
##   <fct> <int>  <int> <dbl>  <dbl> <dbl> <dbl> <dbl>
## 1 1        50      0  2.10   3.75  3.79  5.65 1.04 
## 2 2        50      0  2.79   4.33  4.36  5.40 0.704
## 3 4        50      0  3.14   4.14  4.09  5.37 0.720
## 4 8        50      0  2.47   3.52  3.51  4.37 0.568
## 5 15       50      0  2.56   3.90  3.87  4.65 0.473
## 6 30       50      0  3.81   5.09  5.04  6.13 0.458

Kruskal–Wallis test illustrates evidence of statistical differences.

kruskal.test(val ~ K, data = performance)
## 
##  Kruskal-Wallis rank sum test
## 
## data:  val by K
## Kruskal-Wallis chi-squared = 138.11, df = 5, p-value < 2.2e-16

Results for post-hoc Wilcoxon rank-sum test with a Bonferroni correction.

pairwise.wilcox.test(x = performance$val, g = performance$K, p.adjust.method = "bonferroni",
                     paired = FALSE, conf.int = FALSE, alternative = 't')
## 
##  Pairwise comparisons using Wilcoxon rank sum test with continuity correction 
## 
## data:  performance$val and performance$K 
## 
##    1       2       4       8       15     
## 2  0.00094 -       -       -       -      
## 4  0.37925 0.15967 -       -       -      
## 8  0.60413 3.0e-10 3.0e-06 -       -      
## 15 1.00000 3.1e-05 0.62456 0.00030 -      
## 30 6.3e-12 9.1e-08 9.0e-12 4.2e-16 5.4e-15
## 
## P value adjustment method: bonferroni

7.5.5 Largest valley reached throughout

The largest valley reached in a single trait throughout an entire evolutionary run. To collect this value, we look through all the best-performing solutions each generation and find the largest valley reached.

plot = filter(best_df, acro == 'mpe' & var == 'ele_big_peak') %>%
  ggplot(., aes(x = K, y = val, color = K, fill = K, shape = K)) +
  geom_flat_violin(position = position_nudge(x = .1, y = 0), scale = 'width', alpha = 0.2, width = 1.5) +
  geom_boxplot(color = 'black', width = .07, outlier.shape = NA, alpha = 0.0, size = 1.0, position = position_nudge(x = .16, y = 0)) +
  geom_point(position = position_jitter(width = 0.03, height = 0.02), size = 2.0, alpha = 1.0) +
  scale_y_continuous(
    name="Valley reached",
    limits=c(8.9,14.1)
  ) +
  scale_x_discrete(
    name="K"
  )+
  scale_shape_manual(values=SHAPE)+
  scale_colour_manual(values = cb_palette, ) +
  scale_fill_manual(values = cb_palette) +
  ggtitle('Largest valley reached')+
  p_theme

plot_grid(
  plot +
    theme(legend.position="none"),
  legend,
  nrow=2,
  rel_heights = c(3,1)
)

7.5.5.1 Stats

Summary statistics for the largest valley crossed.

valleys = filter(best_df, acro == 'mpe' & var == 'ele_big_peak')
valleys$K = factor(valleys$K, levels = NS_LIST)
valleys %>%
  group_by(K) %>%
  dplyr::summarise(
    count = n(),
    na_cnt = sum(is.na(val)),
    min = min(val, na.rm = TRUE),
    median = median(val, na.rm = TRUE),
    mean = mean(val, na.rm = TRUE),
    max = max(val, na.rm = TRUE),
    IQR = IQR(val, na.rm = TRUE)
  )
## # A tibble: 6 x 8
##   K     count na_cnt   min median  mean   max   IQR
##   <fct> <int>  <int> <dbl>  <dbl> <dbl> <dbl> <dbl>
## 1 1        50      0    11     12 12.2     14     1
## 2 2        50      0    10     12 12.2     14     1
## 3 4        50      0    10     11 10.8     12     1
## 4 8        50      0     9     10 10.1     12     0
## 5 15       50      0     9     10  9.92    11     0
## 6 30       50      0     9     10 10.2     11     1

Kruskal–Wallis test illustrates evidence of statistical differences.

kruskal.test(val ~ K, data = valleys)
## 
##  Kruskal-Wallis rank sum test
## 
## data:  val by K
## Kruskal-Wallis chi-squared = 201.02, df = 5, p-value < 2.2e-16

Results for post-hoc Wilcoxon rank-sum test with a Bonferroni correction.

pairwise.wilcox.test(x = valleys$val, g = valleys$K, p.adjust.method = "bonferroni",
                     paired = FALSE, conf.int = FALSE, alternative = 't')
## 
##  Pairwise comparisons using Wilcoxon rank sum test with continuity correction 
## 
## data:  valleys$val and valleys$K 
## 
##    1       2       4       8    15  
## 2  1.00    -       -       -    -   
## 4  4.2e-12 7.4e-12 -       -    -   
## 8  2.9e-15 5.9e-15 2.9e-06 -    -   
## 15 < 2e-16 < 2e-16 5.3e-09 1.00 -   
## 30 1.1e-15 2.6e-15 5.9e-05 1.00 0.25
## 
## P value adjustment method: bonferroni