Unfoldm: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
imported>Scott
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
===Purpose===
===Purpose===


Line 10: Line 9:
===Description===
===Description===


UNFOLDM unfolds the input matrix xaug to create a matrix of unfolded row vectors xmpca for MPCA. xaug contains nsamp matrices '''A'''j augmented such that [xaug] = [A1; A2; ...; Ansamp]. For example, for xaug of size (nsamp\*m by n) each matrix '''A'''j is of size m by n. For '''A'''j each m by 1 column ai is transposed and augmented such that [bj] = [a1', a2', ..., an'] and [xmpca] = [b1; b2; ...; bnsamp]. Note: the '''A'''j should all be the same size.
UNFOLDM unfolds the input matrix <tt>xaug</tt> to create a matrix of unfolded row vectors xmpca for MPCA. <tt>xaug</tt> contains <tt>nsamp</tt> matrices '''A'''j augmented such that <tt>[xaug] = [A1; A2; ...; Ansamp]</tt>. For example, for <tt>xaug</tt> of size (<tt>nsamp\*m by n</tt>) each matrix '''A'''j is of size m by n. For '''A'''j each m by 1 column <tt>ai</tt> is transposed and augmented such that <tt>[bj] = [a1', a2', ..., an']</tt> and <tt>[xmpca] = [b1; b2; ...; bnsamp]</tt>. Note: the '''A'''j should all be the same size.


===Examples===
===Examples===


<pre>
a = [1    2    3
a = [1    2    3
 
    4    5    6
:    4    5    6
    -1    -2    -3
 
    -4    -5    -6]
:    -1    -2    -3
 
:    -4    -5    -6]
 
xmpca = unfoldm(a,2)
xmpca = unfoldm(a,2)
xmpca = [1    4    2    5    3    6
xmpca = [1    4    2    5    3    6
         -1    -4    -2    -5    -3    -6]
         -1    -4    -2    -5    -3    -6]
 
</pre>
===See Also===
===See Also===


[[gscale]], [[mpca]], [[pca]], [[reshape]]
[[gscale]], [[gscaler]], [[mpca]], [[npls]], [[parafac]], [[parafac2]], [[pca]], [[tucker]], [[unfoldmw]]

Latest revision as of 15:09, 21 September 2011

Purpose

Unfolds an augmented matrix for MPCA.

Synopsis

xmpca = unfoldm(xaug,nsamp)

Description

UNFOLDM unfolds the input matrix xaug to create a matrix of unfolded row vectors xmpca for MPCA. xaug contains nsamp matrices Aj augmented such that [xaug] = [A1; A2; ...; Ansamp]. For example, for xaug of size (nsamp\*m by n) each matrix Aj is of size m by n. For Aj each m by 1 column ai is transposed and augmented such that [bj] = [a1', a2', ..., an'] and [xmpca] = [b1; b2; ...; bnsamp]. Note: the Aj should all be the same size.

Examples

a = [1     2     3
     4     5     6
    -1    -2    -3
    -4    -5    -6]
xmpca = unfoldm(a,2)
xmpca = [1     4     2     5     3     6
        -1    -4    -2    -5    -3    -6]

See Also

gscale, gscaler, mpca, npls, parafac, parafac2, pca, tucker, unfoldmw