factor_analyzer.factor_analyzer_utils.commutation_matrix

factor_analyzer.factor_analyzer_utils.commutation_matrix(p, q)

Calculate the commutation matrix.

This matrix transforms the vectorized form of the matrix into the vectorized form of its transpose.

Parameters

Name Type Description Default
p int The number of rows. required
q int The number of columns. required

Returns

Name Type Description
commutation_matrix :obj:numpy.ndarray The commutation matrix

References

https://en.wikipedia.org/wiki/Commutation_matrix