prepare_orthogonal_matrix {gips} | R Documentation |
Prepare orthogonal matrix
Description
Calculate the orthogonal matrix U_Gamma
for decomposition in
Theorem 1 from references.
Usage
prepare_orthogonal_matrix(perm, perm_size = NULL, basis = NULL)
Arguments
perm |
An object of a |
perm_size |
Size of a permutation.
Required if |
basis |
A matrix with basis vectors in COLUMNS. Identity by default. |
Details
Given X - a matrix invariant under the permutation perm
. Call Gamma
the permutations cyclic group: .
Then, is such an orthogonal matrix, which block-diagonalizes X.
To be more precise, the matrix t(U_Gamma) %*% X %*% U_Gamma
has a
block-diagonal structure, which is ensured by
Theorem 1 from references.
The formula for U_Gamma
can be found in
Theorem 6 from references.
A nice example is demonstrated in the Block Decomposition - [1], Theorem 1
section of vignette("Theory", package="gips")
or its
pkgdown page.
Value
A square matrix of size perm_size
by perm_size
with
columns from vector elements according to
Theorem 6 from references.
References
Piotr Graczyk, Hideyuki Ishi, Bartosz Kołodziejek, Hélène Massam. "Model selection in the space of Gaussian models invariant by symmetry." The Annals of Statistics, 50(3) 1747-1774 June 2022. arXiv link; doi:10.1214/22-AOS2174
See Also
-
project_matrix()
- A function used in examples to show the properties ofprepare_orthogonal_matrix()
. -
Block Decomposition - [1], Theorem 1 section of
vignette("Theory", package = "gips")
or its pkgdown page - A place to learn more about the math behind thegips
package and see more examples ofprepare_orthogonal_matrix()
.
Examples
gperm <- gips_perm("(1,2,3)(4,5)", 5)
U_Gamma <- prepare_orthogonal_matrix(gperm)
number_of_observations <- 10
X <- matrix(rnorm(5 * number_of_observations), number_of_observations, 5)
S <- cov(X)
X <- project_matrix(S, perm = gperm) # this matrix in invariant under gperm
block_decomposition <- t(U_Gamma) %*% X %*% U_Gamma
round(block_decomposition, 5) # the non-zeros only on diagonal and [1,2] and [2,1]