library(isds)
library(dplyr)
library(ggplot2)

Load classified sims

sims <- read.csv(here::here("analysis", "sims_nounif.csv"), stringsAsFactors = F)

scoring <- read.csv(here::here("analysis", "sim_scores_short.csv"), stringsAsFactors = F)

scoring <- scoring %>%
  mutate(computer_unimodal = ifelse(is.na(computer_unimodal), 0, 1))

sims_scored <- left_join(scoring, sims, by = c("sim", "source", "time_chunk"))

Sample plots

sample_uni <- ggplot(data = filter(sims_scored, human_unimodal == 1), aes(x = wgt)) +
  geom_density() +
  theme_bw() +
  facet_wrap(vars(sim, time_chunk), scales = "free") +
  ggtitle("I called these unimodal")
sample_uni

sample_gap <- ggplot(data = filter(sims_scored, gaps >= 1), aes(x = wgt)) +
  geom_density() +
  theme_bw() +
  facet_wrap(vars(sim, time_chunk), scales = "free") + 
  ggtitle("I called these gappy")
sample_gap

Overall

overall_hist <- ggplot(data = scoring, aes(x = human_unimodal)) +
  geom_bar() +
  theme_bw()
overall_hist

facetted_hist <- overall_hist +
  facet_wrap(vars(source))
facetted_hist


diazrenata/isds documentation built on Dec. 14, 2019, 10:28 p.m.