Description Usage Arguments Details Value Author(s) References Examples
Neural network based nonlinear PCA
1 2 3 
Matrix 

nPcs 

maxSteps 

unitsPerLayer 
The network units, example: c(2,4,6) for two input units 2feature units (principal components), one hidden layer fornonlinearity and three output units (original amount ofvariables). 
functionsPerLayer 
The function to apply at each layer eg. c("linr", "tanh", "linr") 
weightDecay 
Value between 0 and 1. 
weights 
Starting weights for the network. Defaults to uniform random values but can be set specifically to make algorithm deterministic. 
verbose 

... 
Reserved for future use. Not passed on anywhere. 
Artificial Neural Network (MLP) for performing nonlinear PCA. Nonlinear PCA is conceptually similar to classical PCA but theoretically quite different. Instead of simply decomposing our matrix (X) to scores (T) loadings (P) and an error (E) we train a neural network (our loadings) to find a curve through the multidimensional space of X that describes a much variance as possible. Classical ways of interpreting PCA results are thus not applicable to NLPCA since the loadings are hidden in the network. However, the scores of components that lead to low crossvalidation errors can still be interpreted via the score plot. Unfortunately this method depend on slow iterations which currently are implemented in R only making this method extremely slow. Furthermore, the algorithm does not by itself decide when it has converged but simply does 'maxSteps' iterations.
Standard PCA result object used by all PCAbasedmethods of
this package. Contains scores, loadings, data meanand more. See
pcaRes
for details.
Based on a matlab script by Matthias Scholz and ported to R by Henning Redestig
Matthias Scholz, Fatma Kaplan, Charles L Guy, Joachim Kopkaand Joachim Selbig. Nonlinear PCA: a missing data approach. Bioinformatics, 21(20):38873895, Oct 2005
1 2 3 4 5 6 7 8 9 10 11 12 13  ## Data set with three variables where data points constitute a helix
data(helix)
helixNA < helix
## not a single complete observation
helixNA < t(apply(helix, 1, function(x) { x[sample(1:3, 1)] < NA; x}))
## 50 steps is not enough, for good estimation use 1000
helixNlPca < pca(helixNA, nPcs=1, method="nlpca", maxSteps=50)
fittedData < fitted(helixNlPca, helixNA)
plot(fittedData[which(is.na(helixNA))], helix[which(is.na(helixNA))])
## compared to solution by Nipals PCA which cannot extract nonlinear patterns
helixNipPca < pca(helixNA, nPcs=2)
fittedData < fitted(helixNipPca)
plot(fittedData[which(is.na(helixNA))], helix[which(is.na(helixNA))])

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.