collapse | R Documentation |
Collapse the vistla tree into a pairwise graph
collapse(x, aggregate = c("max", "sum", "none"))
x |
vistla object or a vistla_hierarchy object to collapse. |
aggregate |
score aggregation mode. "max" is the maximal score for this edge over all paths in the tree. For raw vistla scores it means the score of the widest path this edge was a part of; for ensemble scores, it corresponds to the count of the most often appearing path with this edge. "sum" is the sum of scores. Makes little sense for raw vistla scores; for ensemble scores it corresponds to the total count of this edge over all paths in the ensemble. "none" returns a vector of scores over all paths, which can be processed anyhow the user desires. |
A pairlist representation of the graph resulting from the tree collapse.
The result is a data frame with the following columns.
A
& B
are the ends of the edge, in order where A is closer to root than B
(interpretation depends on the flow
parameter used in vistla
invocation);
score
is the score aggregated according to the aggregate
argument;
finally paths
is the count of paths which included this edge.
## Not run:
data(junction)
v<-vistla(Y~.,data=junction)
collapse(v)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.