View source: R/prepare_orthogonal_matrix.R
prepare_orthogonal_matrix | R Documentation |
Calculate the orthogonal matrix U_Gamma
for decomposition in
Theorem 1 from references.
prepare_orthogonal_matrix(perm, perm_size = NULL, basis = NULL)
perm |
An object of a |
perm_size |
Size of a permutation.
Required if |
basis |
A matrix with basis vectors in COLUMNS. Identity by default. |
Given X - a matrix invariant under the permutation perm
. Call Gamma
the permutations cyclic group: \Gamma = <perm> = \{perm, perm^2, ...\}
.
Then, U_\Gamma
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.
A square matrix of size perm_size
by perm_size
with
columns from vector elements v_k^{(c)}
according to
Theorem 6 from 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; \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/22-AOS2174")}
project_matrix()
- A function used in examples
to show the properties of prepare_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 the gips
package
and see more examples of prepare_orthogonal_matrix()
.
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]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.