Neural Network Toolbox Previous page   Next Page
trapca

Principal component transformation

Syntax

[Ptrans] = trapca(P,transMat)

Description

trapca preprocesses the network input training set by applying the principal component transformation that was previously computed by prepca. This function needs to be used when a network has been trained using data normalized by prepca. All subsequent inputs to the network need to be transformed using the same normalization.

trapca(P,transMat) takes these inputs,

and returns,

Examples

Here is the code to perform a principal component analysis and retain only those components that contribute more than two percent to the variance in the data set. prestd is called first to create zero mean data, which is needed for prepca.

If we then receive new inputs to apply to the trained network, we will use trastd and trapca to transform them first. Then the transformed inputs can be used to simulate the previously trained network. The network output must also be unnormalized using poststd.

Algorithm

See Also

prestd, premnmx, prepca, trastd, tramnmx


Previous page  tramnmx trastd Next page

© 1994-2005 The MathWorks, Inc.