pot_list | R Documentation |
A check and extraction of clique potentials from a Markov random field to be used in the junction tree algorithm
pot_list(x, g)
## S3 method for class 'data.frame'
pot_list(x, g)
x |
Character |
g |
A decomposable Markov random field as an igraph object. |
# Typically one would use the ess package:
# library(ess)
# g <- ess::fit_graph(derma)
# pl <- pot_list(derma, ess::as_igraph(g))
# pl
# Another example
g <- igraph::sample_gnm(ncol(asia), 12)
while(!igraph::is.chordal(g)$chordal) g <- igraph::sample_gnm(ncol(asia), 12, FALSE)
igraph::V(g)$name <- colnames(asia)
plot(g)
pot_list(asia, g)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.