Index a cia_post_chains object.
Examples
data <- bnlearn::learning.test
scorer <- CreateScorer(
scorer = BNLearnScorer,
data = data
)
init_state <- InitPartition(colnames(data), scorer)
results <- SampleChains(10, init_state, PartitionMCMC(), scorer)
dag_chains <- PartitiontoDAG(results, scorer)
pedge_sample <- SampleEdgeProbabilities(dag_chains)
head(pedge_sample[[1]])
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
#> [1,] 0 1 1 1 0 1 0 0 0 0 0 0 0 0
#> [2,] 0 1 1 1 0 1 0 0 0 0 0 0 0 0
#> [3,] 0 1 1 1 0 1 0 0 0 0 0 0 0 0
#> [4,] 0 1 1 1 0 1 0 0 0 0 0 0 0 0
#> [5,] 0 1 1 1 0 1 0 0 0 0 0 0 0 0
#> [6,] 0 1 1 1 0 0 0 0 0 0 0 0 0 0
#> [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26]
#> [1,] 0 0 0 0 0 0 0 0 0 0 0 1
#> [2,] 0 0 0 0 0 0 0 0 0 0 0 1
#> [3,] 0 0 0 0 0 0 0 0 0 0 0 1
#> [4,] 0 0 0 0 0 0 0 0 0 0 0 1
#> [5,] 0 0 0 0 0 0 0 0 0 0 0 1
#> [6,] 0 0 0 0 0 1 1 0 1 0 0 1
#> [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36]
#> [1,] 0 0 0 0 0 1 0 0 1 0
#> [2,] 0 0 0 0 0 1 0 0 1 0
#> [3,] 0 0 0 0 0 1 0 0 1 0
#> [4,] 0 0 0 0 0 1 0 0 1 0
#> [5,] 0 0 0 0 0 1 0 0 1 0
#> [6,] 0 0 0 1 0 0 0 0 0 0
#> attr(,"class")
#> [1] "cia_post_chain"