do.hilbert {hilbertSimilarity} | R Documentation |
Generate the Hilbert Index from a Cut Reference Matrix
Description
Generate the Hilbert Index corresponding to the sub-spaces defined by the coordinates
generated via do.cut
Usage
do.hilbert(mat, horder)
Arguments
mat |
the cut reference matrix |
horder |
the Hilbert order, i.e. the number of bins in each dimension |
Details
For each line in mat
, the function will compute the corresponding
Hilbert index. Each index corresponds to a specific
sub-cube of the original high-dimensional space, and consecutive hilbert index correspond to adjacent sub-cubes
Value
a vector of indices, one for each line in mat
Author(s)
Marilisa Neri
Yann Abraham
John Skilling (for the original C
function)
Examples
# generate a random 3D matrix
mat <- matrix(rnorm(300),ncol=3)
dimnames(mat)[[2]] <- LETTERS[1:3]
# 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)
# generate the Hilber index
hc <- do.hilbert(cut.mat,2)
plot(table(hc),type='l')
[Package hilbertSimilarity version 0.4.3 Index]