Description Usage Arguments Value Examples
Extend leaves with additional nodes
1 2 3 | ExtendLeaves(X, TargetPG, Mode = "WeigthedCentroid", ControlPar = 0.9,
DoSA = FALSE, LeafIDs = NULL, TrimmingRadius = Inf,
PlotSelected = TRUE)
|
X |
numeric matrix, the data matrix |
TargetPG |
list, the ElPiGraph structure to extend |
Mode |
string, the mode used to extend the graph. "QuantCentroid" and "WeigthedCentroid" are currently implemented |
ControlPar |
positive numeric, the paramter used to control the contribution of the different data points |
DoSA |
bollean, should optimization (via simulated annealing) be performed when Mode = "QuantDists"? |
LeafIDs |
integer vector, the id of nodes to extend. If NULL, all the vertices will be extended. |
TrimmingRadius |
positive numeric, the trimming radius used to control distance |
PlotSelected |
boolean, should a diagnostic plot be visualized |
The extended ElPiGraph structure
The value of ControlPar has a different interpretation depending on the valus of Mode. In each case, for only the extreme points, i.e., the points associated with the leaf node that do not have a projection on any edge are considered.
If Mode = "QuantCentroid", for each leaf node, the extreme points are ordered by their distance from the node and the centroid of the points farther away than the ControlPar is returned.
If Mode = "WeigthedCentroid", for each leaf node, a weight is computed for each points by raising the distance to the ControlPar power. Hence, larger values of ControlPar result in a larger influence of points farther from the node
If Mode = "QuantDists", for each leaf node, ... will write it later
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | TreeEPG <- computeElasticPrincipalTree(X = tree_data, NumNodes = 50,
drawAccuracyComplexity = FALSE, drawEnergy = FALSE)
ExtStruct <- ExtendLeaves(X = tree_data, TargetPG = TreeEPG[[1]], Mode = "QuantCentroid", ControlPar = .5)
PlotPG(X = tree_data, TargetPG = ExtStruct)
ExtStruct <- ExtendLeaves(X = tree_data, TargetPG = TreeEPG[[1]], Mode = "QuantCentroid", ControlPar = .9)
PlotPG(X = tree_data, TargetPG = ExtStruct)
ExtStruct <- ExtendLeaves(X = tree_data, TargetPG = TreeEPG[[1]], Mode = "WeigthedCentroid", ControlPar = .2)
PlotPG(X = tree_data, TargetPG = ExtStruct)
ExtStruct <- ExtendLeaves(X = tree_data, TargetPG = TreeEPG[[1]], Mode = "WeigthedCentroid", ControlPar = .8)
PlotPG(X = tree_data, TargetPG = ExtStruct)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.