Description Usage Arguments Value Author(s) Examples
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.
1 2 |
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. |
Returns a data matrix of the new dimensions.
Ron Wehrens
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(cepha)
gr <- somgrid(3,3, "hexagonal")
X <- bucket(cepha$patterns, 4)
system.time(x <- wccsom(X, grid=gr, trwidth=5,
rlen=500, FineTune=FALSE))
## this is much faster than the following code:
## Not run:
set.seed(7)
system.time(x <- wccsom(cepha$patterns, grid=gr, trwidth=20,
rlen=500, FineTune=FALSE))
## End(Not run)
|
Loading required package: class
Loading required package: MASS
Loading required package: kohonen
Attaching package: 'kohonen'
The following object is masked from 'package:class':
somgrid
Attaching package: 'wccsom'
The following object is masked from 'package:kohonen':
unit.distances
0%....20%....40%....60%....80%....
user system elapsed
0.128 0.000 0.129
0%....20%....40%....60%....80%....
user system elapsed
2.148 0.007 2.172
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.