Commit 5818df33 authored by Gilles Kratzer's avatar Gilles Kratzer
Browse files

update random dag start with constraints

parent 1f4621c4
Pipeline #2449 passed with stage
in 3 seconds
......@@ -70,6 +70,14 @@ mcmcabn <- function(score.cache = NULL, score = "mlik", data.dists = NULL, max.p
}
colnames(dag.tmp) <- rownames(dag.tmp) <- name.dag <- sample(1:n.var)
dag.tmp <- dag.tmp[order(name.dag), order(name.dag)]
#check constraints
dag.tmp <- dag.tmp + retain
dag.tmp <- dag.tmp*(1-ban)
## run a series of checks on the DAG passed
dag.tmp <- abs(dag.tmp)
## consistency checks
diag(dag.tmp) <- 0
dag.tmp[dag.tmp > 0] <- 1
}
if (is.character(start.dag) && start.dag == "hc"){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment