skIncrPCA: use sklearn IncrementalPCA procedure

Description Usage Arguments Value Examples

View source: R/skIPCA.R

Description

use sklearn IncrementalPCA procedure

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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

BiocSklearn documentation built on Nov. 8, 2020, 7:52 p.m.