Learn R Programming

multivarious (version 0.2.0)

projector: Construct a projector instance

Description

A projector maps a matrix from an N-dimensional space to d-dimensional space, where d may be less than N. The projection matrix, v, is not necessarily orthogonal. This function constructs a projector instance which can be used for various dimensionality reduction techniques like PCA, LDA, etc.

Usage

projector(v, preproc = prep(pass()), ..., classes = NULL)

Value

An instance of type projector.

Arguments

v

A matrix of coefficients with dimensions nrow(v) by ncol(v) (number of columns = number of components)

preproc

A prepped pre-processing object. Default is the no-processing pass() preprocessor.

...

Extra arguments to be stored in the projector object.

classes

Additional class information used for creating subtypes of projector. Default is NULL.

Examples

Run this code
X <- matrix(rnorm(10*10), 10, 10)
svdfit <- svd(X)
p <- projector(svdfit$v)
proj <- project(p, X)

Run the code above in your browser using DataLab