Description Usage Arguments Details Value Author(s) References See Also Examples
Determines the structure of a t-cherry tree by expanding a Chow-Liu tree.
1 |
data |
The data the tree structure should be based on. |
... |
Additional arguments passed to |
This function i mainly kept for historical purposes, and it is
recommended to use increase_order2
instead.
The algorithm for constructing the t-cherry tree from a Chow-Liu tree is as described in \insertRefEKTStcherry.
The algorithm is greedy in the sence that it always attempts to use the three variables with highest mutual information as the next cherry.
A list containing the following components:
adj_matrix
The adjacency matrix for the t-cherry
tree.
cliques
A list containing the cliques of
the t-cherry tree.
separators
A list containing the separators of a
junction tree for the t-cherry tree.
Katrine Kirkeby, enir_tak@hotmail.com
Maria Knudsen, mariaknudsen@hotmail.dk
Ninna Vihrs, ninnavihrs@hotmail.dk
EKTStcherry
ChowLiu
for construction of Chow-Liu
trees and MI3
for mutual information of three
variables.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | set.seed(43)
var1 <- c(sample(c(1, 2), 100, replace = TRUE))
var2 <- var1 + c(sample(c(1, 2), 100, replace = TRUE))
var3 <- var1 + c(sample(c(0, 1), 100, replace = TRUE,
prob = c(0.9, 0.1)))
var4 <- c(sample(c(1, 2), 100, replace = TRUE))
var5 <- var2 + var3
var6 <- var1 - var4 + c(sample(c(1, 2), 100, replace = TRUE))
var7 <- c(sample(c(1, 2), 100, replace = TRUE))
data <- data.frame("var1" = as.character(var1),
"var2" = as.character(var2),
"var3" = as.character(var3),
"var4" = as.character(var4),
"var5" = as.character(var5),
"var6" = as.character(var6),
"var7" = as.character(var7))
# smooth used in both MI2 and MI3
(tch <- tcherry_CL(data, smooth = 0.1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.