skIncrPCA_h5 | R Documentation |
demo of HDF5 processing with incremental PCA/batch_size/fit_transform
skIncrPCA_h5(fn, dsname = "assay001", n_components, chunk.size = 10L)
fn |
character(1) path to HDF5 file |
dsname |
character(1) name of dataset within HDF5 file, assumed to be 2-dimensional array |
n_components |
numeric(1) passed to IncrementalPCA |
chunk.size |
numeric(1) passed to IncrementalPCA as batch_size |
Here we use IncrementalPCA$fit_transform and let python take care of chunk retrieval.
skIncrPartialPCA
acquires chunks from R matrix and uses IncrementalPCA$partial_fit.
if (interactive()) {
fn = system.file("hdf5/irmatt.h5", package="BiocSklearn") # 'transposed' relative to R iris
dem = skIncrPCA_h5(fn, n_components=3L, dsname="tquants")
dem
head(getTransformed(dem))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.