make.cut {hilbertSimilarity}R Documentation

Generate Cutting Points for a Multidimensional Matrix

Description

For a given column cur.ch that belongs to a matrix, and a given number of cuts n, compute n-1 bins using either fixed of combined limits

Usage

make.cut(mat, n = 5, count.lim = 40)

Arguments

mat

the matrix to cut

n

the number of cuts to generate (defaults to 5)

count.lim

the minimum number of counts to consider for density (defaults to 40)

Details

the fixed limits correspond to 5 equally spaced values over the range of the column. the combined limits take the local minima and maxima determined using the localMinima and localMaxima functions, to adjust the limits using the following algorithm:

The function returns a list of lists, one for each column in mat, consisting of

Value

a list of of cuts for each column in mat, see details

Author(s)

Yann Abraham

Examples

# generate a random 3D matrix with 2 peaks
mat <- rbind(matrix(rnorm(300),ncol=3),
             matrix(rnorm(300,5,1),ncol=3))
dimnames(mat)[[2]] <- LETTERS[1:3]
# estimate the Hilbert order
hilbert.order(mat)
# generate 2 bins with a minimum bin size of 5
cuts <- make.cut(mat,n=3,count.lim=5)
show.cut(cuts)
# Generate the cuts
cut.mat <- do.cut(mat,cuts,type='fixed')
head(cut.mat)

[Package hilbertSimilarity version 0.4.3 Index]