tests/test_data.R

# Scaled down sachs data for tests.
data(isachs)
node_names <- c("PKA", "Raf", "Akt", "P38", "Jnk")
ssachs <- isachs[, c(node_names, "INT")]
ssachs$INT <- sapply(isachs$INT, function(int){
  if(int != 0){
    int_name <- names(isachs)[int]
    if(int_name %in% node_names){
      return(which(node_names == int_name))
    }
  }
  return(0)
})
save(ssachs, file = "tests/ssachs.rda")
algo_args <- list(score = "bde", iss = 1, tabu = 50, whitelist = NULL)
M_base <- ssachs %>%
  filter(INT == "0") %>%
  select(-INT) %>%
  boot.strength(algorithm = "tabu", cpdag = TRUE,
                                 algorithm.args = algo_args) %>%
  averaging_entropy
save(M_base, file = "tests/M_base.rda")
robertness/bninfo documentation built on May 27, 2019, 10:32 a.m.