Description Usage Arguments Examples
Compute "on the graph" distance
1 | DistanceOnGraph(X, TargetPG)
|
X |
|
TargetPG |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(ElPiGraph.R)
PG <- computeElasticPrincipalTree(X = tree_data, NumNodes = 50, InitNodes = 2, verbose = TRUE)
Dist <- DistanceOnGraph(X = tree_data, TargetPG = PG[[1]])
HC <- hclust(as.dist(Dist$FullDist))
GG <- cutree(HC, k = 10)
PlotPG(X = tree_data, TargetPG = PG[[1]], GroupsLab = factor(GG))
CompleteDist <- Dist$FullDist + Dist$DistFromGraph
HC <- hclust(as.dist(CompleteDist))
GGFull <- cutree(HC, k = 10)
PlotPG(X = tree_data, TargetPG = PG[[1]], GroupsLab = factor(GGFull))
table(GG, GGFull)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.