mrfse.create.sampler | R Documentation |
Create a sampler for Markov random field from a DAG
mrfse.create.sampler(dag_adj, A)
dag_adj |
An direct acyclic graph adjacency matrix |
A |
Size of alphabet |
A list filled with the following components:
neigh: A list of neighborhood. For each i, neigh[[i]] is a markovian neighborhood of vertex i
probs: A list of probabilities. For each i, probs[[i]] is matrix of probabilities of vertex i given your markovian neighborhood. Those probabilites will be used to generate a sample.
moral_adj: moral graph of adj_dag
topol_sort: topological sort of adj_dag
num_nodes: number of nodes de adj_dag
A: alphabet size
Rodrigo Carvalho
library(mrfse) adj = matrix(c(0, 1, 0, 0, 0, 0, 0, 1, 0), byrow=TRUE, ncol=3) mrfse.create.sampler(adj, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.