Learn R Programming

extracat (version 1.7-6)

sortandcut: Sort-and-Cut Reordering

Description

An implementation of the sort-and-cut algorithm which is a mixture of the top-down-partitioning algorithm used by cfluctile and the reordering techniques available through optile. See details.

Usage

sortandcut(x,iter=20, tau0 = NULL, fun = "BCC", method = "WBCI")

Arguments

x

A matrix or 2D table.

iter

The number of random initial orderings for optile.

tau0

The minimum criterion value for a new cut. See cfluctile.

fun

The reordering function used by optile. Currently "BCC", "barysort" and "preclass" are available.

method

The method argument for cfluctile which defines the criterion used to find an optimal partition.

Value

The reordered matrix. The row and column order vectors are attached as an attributes attr(x ,"orders").

Details

The algorithm sorts a matrix using optile and cuts the reordered matrix once using cfluctile with nsplit = 1. Then the same procedure is applied to the resulting submatrices at the top left and the bottom right. The partitioning stops when the best cut leads to a criterion below tau0.

See Also

cfluctile

Examples

Run this code
# NOT RUN {
M <- arsim(12000,c(30,40),7,noise=0.3)
c1 <- cfluctile(M1<-optile(M, iter = 20))
c2 <- cfluctile(M2<-sortandcut(M))

# }

Run the code above in your browser using DataLab