skIncrPCA {BiocSklearn} | R Documentation

## use sklearn IncrementalPCA procedure

### Description

use sklearn IncrementalPCA procedure

### Usage

    skIncrPCA(mat, n_components = 2L, batch_size = 5L, ...)

### Arguments

`mat` | a matrix – can be R matrix or numpy.ndarray, if the latter it must be set up in a basilisk persistent environment, and that is not currently demonstrated for this package.
`n_components` | number of PCA to retrieve
`batch_size` | number of records to use at each iteration
`...` | passed to python IncrementalPCA

### Value

matrix with rotation

### Examples

    dem = skIncrPCA(iris[,1:4], batch_size=25L)
    ## Not run:
    # this is the unsupported way
    irloc = system.file("csv/iris.csv", package="BiocSklearn")
    irismat = SklearnEls()$np$genfromtxt(irloc, delimiter=',')
    ski = skIncrPCA(irismat)
    ski25 = skIncrPCA(irismat, batch_size=25L) # non-default
    getTransformed(ski)[1:3,]
    getTransformed(ski25)[1:3,]

    ## End(Not run) # end dontrun
    dem = skIncrPCA(iris[,1:4], batch_size=25L, n_components=2L)
    dem

[Package BiocSklearn version 1.12.0 Index]