plot.bcdag {BCDAG} | R Documentation |
bcdag object plot
Description
This method returns summary plots of the output of learn_DAG()
.
Usage
## S3 method for class 'bcdag'
plot(x, ..., ask = TRUE)
Arguments
x |
a |
... |
additional arguments affecting the summary produced |
ask |
Boolean argument passed to par() for visualization; |
Value
Plot of the Median Probability DAG, a heatmap of the probabilities of edge inclusion and an histogram of the sizes of graphs visited by learn_DAG().
Examples
n <- 1000
q <- 4
DAG <- matrix(c(0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0), nrow = q)
L <- DAG
L[L != 0] <- runif(q, 0.2, 1)
diag(L) <- c(1,1,1,1)
D <- diag(1, q)
Sigma <- t(solve(L))%*%D%*%solve(L)
a <- 6
g <- 1/1000
U <- g*diag(1,q)
w = 0.2
set.seed(1)
X <- mvtnorm::rmvnorm(n, sigma = Sigma)
out <- learn_DAG(1000, 0, X, a, U, w, fast = TRUE, collapse = TRUE, save.memory = FALSE)
plot(out)
[Package BCDAG version 1.1.1 Index]