geometric_kernels.spaces.so¶
This module provides the SpecialOrthogonal
space, the respective
Eigenfunctions
subclass SOEigenfunctions
,
and a class SOCharacter
for representing characters of the group.
Module Contents¶
- class geometric_kernels.spaces.so.SOCharacter(n, signature)[source]¶
Bases:
geometric_kernels.spaces.lie_groups.LieGroupCharacter
The class that represents a character of the SO(n) group.
These characters are always real-valued.
These are polynomials whose coefficients are precomputed and stored in a file. By default, there are 20 precomputed characters for n from 3 to 8. If you want more, use the utils/compute_characters.py script.
- Parameters:
n (int) – The order n of the SO(n) group.
signature (beartype.typing.Tuple[int, Ellipsis]) – The signature that determines a particular character (and an irreducible unitary representation along with it).
- __call__(gammas)[source]¶
Compute the character on gammas lying in a maximal torus.
- Parameters:
gammas (lab.Numeric) – […, rank] where rank is the dimension of a maximal torus.
- Returns:
An array of shape […] representing the values of the characters. The values can be complex-valued.
- Return type:
lab.Numeric
- class geometric_kernels.spaces.so.SOEigenfunctions(n, num_levels, compute_characters=True)[source]¶
Bases:
geometric_kernels.spaces.lie_groups.WeylAdditionTheorem
A class for computing the sums of outer products of certain combinations (we call “levels”) of Laplace-Beltrami eigenfunctions on compact Lie groups. These are much like the zonal spherical harmonics of the
SphericalHarmonics
class. However, the key to computing them is representation-theoretic: they are proportional to characters of irreducible unitary representations of the group. These characters, in their turn, can be algebraically computed using the Weyl character formula. See Azangulov et al. [2022] for the mathematical details behind this class.- Parameters:
n – The order of the Lie group, e.g. for SO(5) this is 5, for SU(3) this is 3.
num_levels – The number of levels used for kernel approximation. Here, each level corresponds to an irreducible unitary representation of the group.
compute_characters –
Whether or not to actually compute the characters. Setting this parameter to False might make sense if you do not care about eigenfunctions (or sums of outer products thereof), but care about eigenvalues, dimensions of irreducible unitary representations, etc.
Defaults to True.
Note
Unlike
SphericalHarmonics
, we do not expect the descendants of this class to compute the actual Laplace-Beltrami eigenfunctions (which are similar to (non-zonal) spherical harmonics ofSphericalHarmonics
), implementing the __call___ method. In this case, this is not really necessary and computationally harder.Note
Unlike in
SphericalHarmonics
, here the levels do not necessarily correspond to whole eigenspaces (all eigenfunctions that correspond to the same eigenvalue). Here, levels are defined in terms of the algebraic structure of the group: they are the eigenfunctions that correspond to the same irreducible unitary representation of the group.Note
Here we break the general convention that the subclasses of the
Eigenfunctions
only provide an interface for working with eigenfunctions, not eigenvalues, offering an interface for computing the latter as well.- abstract __call__(X, **kwargs)¶
Evaluate the individual eigenfunctions at a batch of input locations.
- Parameters:
X (lab.Numeric) – Points to evaluate the eigenfunctions at, an array of shape [N, <axis>], where N is the number of points and <axis> is the shape of the arrays that represent the points in a given space.
**kwargs – Any additional parameters.
- Returns:
An [N, J]-shaped array, where J is the number of eigenfunctions.
- Return type:
lab.Numeric
- class geometric_kernels.spaces.so.SpecialOrthogonal(n)[source]¶
Bases:
geometric_kernels.spaces.lie_groups.CompactMatrixLieGroup
The GeometricKernels space representing the special orthogonal group SO(n) consisting of n by n orthogonal matrices with unit determinant.
The elements of this space are represented as n x n orthogonal matrices with real entries and unit determinant.
Note
A tutorial on how to use this space is available in the SpecialOrthogonal.ipynb notebook.
- Parameters:
n (int) – The order n of the group SO(n).
Note
We only support n >= 3. Mathematically, SO(2) is equivalent to the unit circle, which is available as the
Circle
space.For larger values of n, you might need to run the utils/compute_characters.py script to precompute the necessary mathematical quantities beyond the ones provided by default. Same can be required for larger numbers of levels.
Citation
If you use this GeometricKernels space in your research, please consider citing Azangulov et al. [2022].
- get_eigenfunctions(num)[source]¶
Returns the
SOEigenfunctions
object with num levels and order n.- Parameters:
num (int) – Number of levels.
- Return type:
- get_eigenvalues(num)[source]¶
Eigenvalues of the Laplacian corresponding to the first num levels.
- Parameters:
num (int) – Number of levels.
- Returns:
(num, 1)-shaped array containing the eigenvalues.
- Return type:
lab.Numeric
Note
The notion of levels is discussed in the documentation of the
MaternKarhunenLoeveKernel
.
- get_repeated_eigenvalues(num)[source]¶
Eigenvalues of the Laplacian corresponding to the first num levels, repeated according to their multiplicity within levels.
- Parameters:
num (int) – Number of levels.
- Returns:
(J, 1)-shaped array containing the repeated eigenvalues, J is the resulting number of the repeated eigenvalues.
- Return type:
lab.Numeric
Note
The notion of levels is discussed in the documentation of the
MaternKarhunenLoeveKernel
.
- static inverse(X)[source]¶
Inverse of a batch X of the elements of the group. A static method.
- Parameters:
X (lab.Numeric) – A batch […, n, n] of elements of the group. Each element is a n x n matrix.
- Returns:
A batch […, n, n] with each n x n matrix inverted.
- Return type:
lab.Numeric
- random(key, number)[source]¶
Sample uniformly random points in the space.
- Parameters:
key (lab.RandomState) – Either np.random.RandomState, tf.random.Generator, torch.Generator or jax.tensor (representing random state).
number (int) – Number of samples to draw.
- Returns:
An array of number uniformly random samples on the space.
- property dimension: int¶
The dimension of the space, as that of a Riemannian manifold.
- Returns:
floor(n(n-1)/2) where n is the order of the group SO(n).
- Return type:
int
- property element_shape¶
- Returns:
[n, n].