
## S3 method for class 'dist':
seriate(x, method = NULL, control = NULL, \ldots)
## S3 method for class 'matrix':
seriate(x, method = NULL, control = NULL,
margin = c(1,2), ...)
## S3 method for class 'array':
seriate(x, method = NULL, control = NULL,
margin = seq(length(dim(x))), ...)
1
indicates rows, 2
indicates columns, c(1,2)
indicates rows and columns. For array, margin gets a vector with
the dimensions to seriaser_permutation
.Two-way two mode data are general positive matrices. Currently the following methods are implemented for matrix: [object Object],[object Object],[object Object]
For array no built-in methods are currently available.
Z. Bar-Joseph, E. D. Demaine, D. K. Gifford, and T. Jaakkola. (2001): Fast Optimal Leaf Ordering for Hierarchical Clustering. Bioinformatics, 17(1), 22--29.
Brusco, M., Koehn, H.F., and Stahl, S. (2007): Heuristic Implementation of Dynamic Programming for Matrix Permutation Problems in Combinatorial Data Analysis. Psychometrika, conditionally accepted.
Brusco, M., and Stahl, S. (2005): Branch-and-Bound Applications in Combinatorial Data Analysis. New York: Springer.
Chen, C. H. (2002): Generalized Association Plots: Information Visualization via Iteratively Generated Correlation Matrices. Statistica Sinica, 12(1), 7--29.
Sharlee Climer, Weixiong Zhang (2006): Rearrangement Clustering: Pitfalls, Remedies, and Applications, Journal of Machine Learning Research, 7(Jun), 919--943.
Gruvaeus, G. and Wainer, H. (1972): Two Additions to Hierarchical Cluster Analysis, British Journal of Mathematical and Statistical Psychology, 25, 200--206.
Hurley, Catherine B. (2004): Clustering Visualizations of Multidimensional Data. Journal of Computational and Graphical Statistics, 13(4), 788--806.
J.K. Lenstra (1974): Clustering a Data Array and the Traveling-Salesman Problem, Operations Research, 22(2) 413--414.
W.T. McCormick, P.J. Schweitzer and T.W. White (1972): Problem decomposition and data reorganization by a clustering technique, Operations Research, 20(5), 993--1009.
criterion
,
solve_TSP
in hclust
in ##seriate dist
data("iris")
x <- as.matrix(iris[-5])
x <- x[sample(1:nrow(x)),]
d <- dist(x)
## default seriation
order <- seriate(d)
order
## plot
def.par <- par(no.readonly = TRUE)
layout(cbind(1,2), respect = TRUE)
pimage(d, main = "Random")
pimage(d, order, main = "Reordered")
par(def.par)
## compare quality
rbind(
random = criterion(d),
reordered = criterion(d, order)
)
## seriate matrix
data("iris")
x <- as.matrix(iris[-5])
## to make the variables comparable, we scale the data
x <- scale(x, center = FALSE)
## try some methods
def.par <- par(no.readonly = TRUE)
layout(matrix(1:4, ncol = 2, byrow = TRUE), respect=TRUE)
pimage(x, main = "original data")
criterion(x)
order <- seriate(x, method = "BEA_TSP")
pimage(x, order, main = "TSP to optimize ME")
criterion(x, order)
order <- seriate(x, method="PCA")
pimage(x, order, main = "first principal component")
criterion(x, order)
## 2 TSPs
order <- c(
seriate(dist(x), method = "TSP"),
seriate(dist(t(x)), method = "TSP")
)
pimage(x, order, main = "2 TSPs")
criterion(x, order)
par(def.par)
Run the code above in your browser using DataLab