prcomp: Principal Components Analysis

Description Usage Arguments Details Value Communication Examples

Description

Performs the principal components analysis.

Usage

1
2
## S3 method for class 'shaq'
prcomp(x, retx = TRUE, center = TRUE, scale. = FALSE, tol = NULL, ...)

Arguments

x

A shaq.

retx

Should the rotated variables be returned?

center

Should columns are zero centered?

scale.

Should columns are rescaled to unit variance?

tol

The cutoff for components.

...

Ignored.

Details

prcomp() performs the principal components analysis on the data matrix by taking the SVD. Sometimes core R and kazaam will disagree slightly in what the rotated variables are because of how the SVD is caluclated.

Value

A list of elements sdev, rotation, center, scale, and x, as with R's own prcomp(). The elements are, respectively, a regular vector, a regular matrix, a regular vector, a regular vector, and a shaq.

Communication

The communication is an allreduce() call, quadratic on the number of columns. Most of the run time should be dominated by relatively expensive local operations.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
library(kazaam)
x = ranshaq(runif, 10, 3)
pca = prcomp(x)

comm.print(pca)

finalize()

## End(Not run)

RBigData/kazaam documentation built on Nov. 9, 2021, 9:09 a.m.