cpt_list {jti} | R Documentation |
Conditional probability list
Description
A check and conversion of cpts to be used in the junction tree algorithm
Usage
cpt_list(x, g = NULL)
## S3 method for class 'list'
cpt_list(x, g = NULL)
## S3 method for class 'data.frame'
cpt_list(x, g)
Arguments
x |
Either a named list with cpts in form of array-like object(s)
where names must be the child node or a |
g |
Either a directed acyclic graph (DAG) as an igraph object or a
decomposable graph as an igraph object. If |
Examples
library(igraph)
el <- matrix(c(
"A", "T",
"T", "E",
"S", "L",
"S", "B",
"L", "E",
"E", "X",
"E", "D",
"B", "D"),
nc = 2,
byrow = TRUE
)
g <- igraph::graph_from_edgelist(el)
cl <- cpt_list(asia, g)
print(cl)
dim_names(cl)
names(cl)
plot(get_graph(cl))
[Package jti version 0.8.4 Index]