geometric_kernels.spaces.circle

This module provides the Circle space and the respective Eigenfunctions subclass SinCosEigenfunctions.

Module Contents

class geometric_kernels.spaces.circle.Circle[source]

Bases: geometric_kernels.spaces.base.DiscreteSpectrumSpace

The GeometricKernels space representing the standard unit circle, denoted by \(\mathbb{S}_1\) (as the one-dimensional hypersphere) or \(\mathbb{T}\) (as the one-dimensional torus).

The elements of this space are represented by angles, scalars from \(0\) to \(2 \pi\).

Levels are the whole eigenspaces. The zeroth eigenspace is one-dimensional, all the other eigenspaces are of dimension 2.

Note

The example notebook on the torus involves this space.

Citation

If you use this GeometricKernels space in your research, please consider citing Borovitskiy et al. [2020].

get_eigenfunctions(num)[source]

Returns the SinCosEigenfunctions object with num levels.

Parameters:

num (int) – Number of levels.

Return type:

geometric_kernels.spaces.eigenfunctions.Eigenfunctions

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.

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
Returns:

Return type:

int

property element_shape
Returns:

[1].

class geometric_kernels.spaces.circle.SinCosEigenfunctions(num_levels)[source]

Bases: geometric_kernels.spaces.eigenfunctions.EigenfunctionsWithAdditionTheorem

Eigenfunctions of the Laplace-Beltrami operator on the circle correspond to the Fourier basis, i.e. sines and cosines.

Levels are the whole eigenspaces. The zeroth eigenspace is one-dimensional, all the other eigenspaces are of dimension 2.

Parameters:

num_levels (int) – The number of levels.

__call__(X, **kwargs)[source]

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

property num_eigenfunctions: int

The number J of eigenfunctions.

Return type:

int

property num_eigenfunctions_per_level: beartype.typing.List[int]

The number of eigenfunctions per level.

Returns:

List result, such that result[l] = 1 if l = 0 or 2 otherwise.

Return type:

beartype.typing.List[int]

property num_levels: int

The number L of levels.

Return type:

int