Description Usage Arguments Details Value Author(s) References Examples
Finds a perfect sequence, returning the cliques, histories, residuals, and separators of a given triangulated graph.
1 |
model |
|
edges |
matrix with 2 columns, each row representing one edge, and each column one of the vertices in the edge. |
p |
number of vertices. |
varType |
vector indicating the type of each variable: 0 if continuous, or 1 if discrete. |
from |
initial vertex to be used in |
Based on the perfect numbering of mcs
, returns the perfect sequnece.
The sequence is given by the cliques in the graph:
Cj=closure(α(j)) intersection {α(1),...,α(j)}, j>=1.
The other sets are given by:
- Histories: Hj=C1 union ... union Cj
- Residuals: Rj=Cj \ H(j-1)
- Separators: Sj=H(j-1) intersection Cj
A list containing:
cliques |
list. |
histories |
list. |
residuals |
list. |
separators |
list. |
Gabriel Coelho Goncalves de Abreu (abreu_ga@yahoo.com.br)
Lauritzen, S.L. (1996) Graphical Models, Oxford University Press.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | edges <- matrix(c(1,2,2,3,2,4,2,5,2,6,3,4,4,5,5,6),ncol=2,byrow=TRUE)
setList <- perfSets(edges=edges, p=6, varType=0, from=1)
# > str(setList)
# List of 4
# $ cliques :List of 4
# ..$ : int [1:2] 1 2
# ..$ : int [1:3] 2 3 4
# ..$ : int [1:3] 2 4 5
# ..$ : int [1:3] 2 5 6
# $ histories :List of 4
# ..$ : int [1:2] 1 2
# ..$ : int [1:4] 1 2 3 4
# ..$ : int [1:5] 1 2 3 4 5
# ..$ : int [1:6] 1 2 3 4 5 6
# $ separators:List of 4
# ..$ : NULL
# ..$ : int 2
# ..$ : int [1:2] 2 4
# ..$ : int [1:2] 2 5
# $ residuals :List of 4
# ..$ : int [1:2] 1 2
# ..$ : int [1:2] 3 4
# ..$ : int 5
# ..$ : int 6
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.