skPCA: use sklearn PCA procedure

View source: R/skPCA.R

skPCAR Documentation

use sklearn PCA procedure

Description

use sklearn PCA procedure

Usage

skPCA(mat, ...)

Arguments

mat

a matrix – can be R matrix or numpy.ndarray

...

additional parameters passed to sklearn.decomposition.PCA, for additional information use py_help() on a reticulate-imported sklearn.decomposition.PCA instance.

Value

matrix with rotation

Note

If no additional arguments are passed, all defaults are used.

Examples

#irloc = system.file("csv/iris.csv", package="BiocSklearn")
#irismat = SklearnEls()$np$genfromtxt(irloc, delimiter=',')
#skpi = skPCA(irismat)
#getTransformed(skpi)[1:5,]
chk = skPCA(data.matrix(iris[,1:4]))
chk
head(getTransformed(chk))
head(prcomp(data.matrix(iris[,1:4]))$x)

vjcitn/BiocSklearn documentation built on Aug. 30, 2024, 2:13 p.m.