bucket {wccsom}R Documentation

Variable averaging (bucketing) for data matrices

Description

Function bucket decreases the size (i.e., the number of columns) of a data matrix by averaging variables. Function debucket achieves the reverse by linear interpolation.

Usage

bucket(x, factor)
debucket(x, nout)

Arguments

x Data matrix: each variable corresponds with a column.
factor Bucket factor: this number of variables will be averaged.
nout Required number of variables after debucketing.

Value

Returns a data matrix of the new dimensions.

Author(s)

Ron Wehrens

Examples

data(cepha)
gr <- somgrid(3,3, "hexagonal")
set.seed(7)
system.time(x <- wccsom(cepha$patterns, grid=gr, trwidth=20,
                        rlen=500, FineTune=FALSE))

X <- bucket(cepha$patterns, 4)
system.time(x <- wccsom(X, grid=gr, trwidth=5,
                        rlen=500, FineTune=FALSE))

[Package wccsom version 1.2.3 Index]