skIncrPCA_h5 {BiocSklearn} | R Documentation

## demo of HDF5 processing with incremental PCA/batch_size/fit_transform

### Description

demo of HDF5 processing with incremental PCA/batch_size/fit_transform

### Usage

    skIncrPCA_h5(fn, dsname = "assay001", n_components, chunk.size = 10L)

### Arguments

`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

### Note

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.

### Examples

    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))
    }

[Package BiocSklearn version 1.10.3 Index]