ipca-H5pymat-integer-integer-logical-method: use chunks from remote HDF5 source to compute incremental PCA

Description Usage Arguments Examples

Description

use chunks from remote HDF5 source to compute incremental PCA

Usage

1
2
3
## S4 method for signature 'H5pymat,integer,integer,logical'
ipca(src, ncomp, batch_size,
  transpose = TRUE)

Arguments

src

H5pymat instance

ncomp

number of PCs to compute

batch_size

number of records per batch

transpose

logical – for HDF5 matrix, set to TRUE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
d = data.matrix(iris[,1:4])
p = prcomp(d)
dim(p$x)
h5targ = tempfile()
require(rhdf5)
require(useret)
h5createFile(h5targ)
h5write(d, h5targ, "iris")
hmat = H5pymat(h5targ)
tst = ipca(hmat, ncomp=4L, batch_size=50L, transpose=TRUE)
dim(tst)

vjcitn/useret documentation built on May 8, 2019, 11:19 p.m.