xprcomp: compute principal projection simulating out of sample data.

Description Usage Arguments Value Examples

View source: R/crosspca.R

Description

compute principal projection simulating out of sample data.

Usage

1
xprcomp(x, k, crossplan, center, scale.)

Arguments

x

matrix to perfrom principal components analysis on.

k

integer number of components to estimate.

crossplan

list of lists which have train and app slots, where app is a partition of seq_len(nrow(x)).

center

logical controls centering of data.

scale.

logical controls scaling of data.

Value

training (simulated out of sample projected) matrix and projection.

Examples

1
2
3
set.seed(23552)
splitPlan <- vtreat::kWayCrossValidation(nrow(USArrests),3,NULL,NULL)
dc <- xprcomp(USArrests,k=2,crossplan=splitPlan,center=TRUE,scale.=TRUE)

WinVector/crosspca documentation built on June 24, 2020, 5:09 p.m.