Description Usage Arguments Value
This function randomly generate conditional probability tables (CPTs) for a given DAG, with specified maximum arity and concentration parameter from a symmetric Dirichlet distribution. Values of variables are sampled from capital alphabet letters, A, B, ... The function has dependency on the library gtools on its rdirichlet() function.
1 |
dag |
A DAG in the bnlearn format. |
maxArity |
The maximum arity for variables. That is, the maximum number of values that a variable can have. |
beta |
The concentration parameter is a symmetric Dirichlet distribution. When beta=1, it is the same as sampling from uniform distribution; when beta>1, CPT values are more likeliy to be equal since they are sampled from a center-peaked n-1 simplex; when beta<1, CPT values are extreme, since they are sampled from conners of the n-1 simplex. |
arities |
The vector of arities for all nodes. By default, it is NULL. |
debug |
A boolean argument to display detailed steps. |
The returned CPTs are stored in a list that matches bnlearn CPTs format, so that the function bnlearn::rbn() can be used to sample data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.