prcomp {kazaam} | R Documentation |
Principal Components Analysis
Description
Performs the principal components analysis.
Usage
## 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 |
Ignored. |
... |
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
## Not run:
library(kazaam)
x = ranshaq(runif, 10, 3)
pca = prcomp(x)
comm.print(pca)
finalize()
## End(Not run)