DendSer: Implements dendrogram seriation

View source: R/DendSer.R

DendSerR Documentation

Implements dendrogram seriation

Description

Implements dendrogram seriation.

Usage

DendSer(h, ser_weight, cost = costBAR, node_op = NULL, costArg = NULL, 
maxloops = NULL, saveinfo = FALSE, direction = NULL,  GW=NULL,...)

Arguments

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.

Details

costED uses the Gruvaeus and Wainer 1972 algorithm, as provided by package gclus.

Value

Numeric vector giving an optimal dendrogram order

Author(s)

Catherine Hurley & Denise Earle

References

Gruvaeus, G. \& Wainer, H. (1972), “Two additions to hierarchical cluster analysis”, British Journal of Mathematical and Statistical Psychology, 25, 200-206.

See Also

dser

Examples

	 			
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



DendSer documentation built on April 27, 2022, 5:07 p.m.

Related to DendSer in DendSer...