DistanceOnGraph: Compute "on the graph" distance

Description Usage Arguments Examples

Description

Compute "on the graph" distance

Usage

1
DistanceOnGraph(X, TargetPG)

Arguments

X
TargetPG

Examples

 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)

Albluca/ElPiGraph.R documentation built on May 28, 2019, 11:02 a.m.