pca_randomvector

PURPOSE ^

Generate random vectors in PCA subspace.

SYNOPSIS ^

function Xr = pca_randomvector( U, mu, variances, k, n, hypershpere, show )

DESCRIPTION ^

 Generate random vectors in PCA subspace.

 Used to generate random vectors from the subspace spanned by the first k
 principal components.  The points generated come from the gaussian
 distribution from within the subspace.

 Can optionally generate points on the subspace that are also on a
 hypershpere centered on the origin.  This may be useful if the original
 data points were all from a hypershpere -- for example they were
 normalized via imnormalize.  Set the optional hypershpere flag to
 1 to generate points only on the hypersphere.

 INPUTS
   U           - [returned by pca] -- see pca
   mu          - [returned by pca] -- see pca
   variances   - [returned by pca] -- see pca
   k           - number of principal coordinates to use
   n           - number of x to generate
   hypershpere - [optional] generate points on hypersphere (see above)
   show        - [optional] figure to use for display (no display if == 0)

 OUTPUTS
   Xr          - resulting randomly generated vectors

 DATESTAMP
   29-Nov-2005  2:00pm

 See also PCA

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Wed 03-May-2006 23:48:50 by m2html © 2003