Implements dendrogram seriation
Implements dendrogram seriation.
DendSer(h, ser_weight, cost = costBAR, node_op = NULL, costArg = NULL, maxloops = NULL, saveinfo = FALSE, direction = NULL, GW=NULL,...)
h |
An object of class hclust |
ser_weight |
Used by cost function to evaluate ordering. For cost=costLS, this is a vector of object weights. Otherwise is a dist or symmetric matrix. |
cost |
Function used to evaluate permutation.Current choices are costLS, costPL, costLPL, costED, costARc, costBAR. |
node_op |
Function used to reorder branches at a dendrogram node. DendSer picks default depending on cost function. NULL means use default depending on cost. |
costArg |
Other args for cost function. |
maxloops |
Maximum number of iterations allowed. NULL means use default depending on cost. |
saveinfo |
Logical, whether info associated with search is saved. |
direction |
Order of visiting nodes. Values are "up" or "down", for nodes in order of increasing or decreasing height.NULL means use default depending on cost. |
GW |
Logical, initial GW step or not. NULL means use default depending on cost. |
... |
Not used. |
costED uses the Gruvaeus and Wainer 1972 algorithm, as provided by package gclus.
Numeric vector giving an optimal dendrogram order
Catherine Hurley & Denise Earle
Gruvaeus, G. \& Wainer, H. (1972), “Two additions to hierarchical cluster analysis”, British Journal of Mathematical and Statistical Psychology, 25, 200-206.
require(DendSer) d<- dist(iris[,-5]) h <- hclust(d,method="average") ob<- DendSer(h,d) opl<- DendSer(h,d,cost=costPL) plotAsColor(d,ob) w <- rowSums(iris[,-5]) ow <- DendSer(h,w,cost=costLS) # arranges cases by size, within hclust stars(iris[ow,-5],labels=NULL, col.stars=cutree(h,3)[ow]) # and color by cluster #stars(iris[ow,-5],labels=NULL, col.stars=iris[ow,5]) # or by species
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.