nifty8.re.structured_kernel_interpolation module#
- class HarmonicSKI(grid_shape: Tuple[int], grid_bounds: Tuple[Tuple[float, float]], sampling_points: Array | ndarray, harmonic_kernel: Callable | None = None, padding: float = 0.5, subslice=None, jitter: bool | float | None = True)[source]#
Bases:
object
- __init__(grid_shape: Tuple[int], grid_bounds: Tuple[Tuple[float, float]], sampling_points: Array | ndarray, harmonic_kernel: Callable | None = None, padding: float = 0.5, subslice=None, jitter: bool | float | None = True)[source]#
Instantiate a KISS-GP model of the covariance using a harmonic representation of the kernel.
- Parameters:
grid_shape – Number of pixels along each axes of the inducing points within grid_bounds.
grid_bounds – Tuple of boundaries of length of the number of dimensions. The boundaries should denote the leftmost and rightmost edge of the modeling space.
sampling_points – Locations of the modeled points within the grid.
harmonic_kernel – Harmonically transformed kernel.
padding – Padding factor which to apply along each axis.
subslice – Slice of the inducing points which to use to model sampling_points. By default, the subslice is determined by the padding.
jitter – Strength of the diagonal jitter which to add to the covariance.
- property harmonic_kernel: Callable#
Yields the harmonic kernel specified during initialization or throw a TypeError.
- class ToeplitzSKI(grid_shape: Tuple[int], grid_bounds: Tuple[Tuple[float, float]], sampling_points: Array | ndarray, kernel: Callable | None = None, jitter: bool | float | None = True)[source]#
Bases:
object
- __init__(grid_shape: Tuple[int], grid_bounds: Tuple[Tuple[float, float]], sampling_points: Array | ndarray, kernel: Callable | None = None, jitter: bool | float | None = True)[source]#
Instantiate a KISS-GP model of the covariance using a Toeplitz matrix representation of the kernel.
- Parameters:
grid_shape – Number of pixels along each axes of the inducing points within grid_bounds.
grid_bounds – Tuple of boundaries of length of the number of dimensions. The boundaries should denote the leftmost and rightmost edge of the modeling space.
sampling_points – Locations of the modeled points within the grid.
kernel – Position space kernel.
jitter – Strength of the diagonal jitter which to add to the covariance.
- property kernel: Callable#
Yields the harmonic kernel specified during initialization or throw a TypeError.
- matmul_toeplitz(c, x)[source]#
Efficiently compute the product of an implicit Toeplitz matrix with a vector.
- Parameters:
c (ndarray) – One-dimensional column of the Toeplitz matrix. It is assumed that the row r is given by r = conjugate(c).
x ((M,) or (M, K) ndarray) – Vector or matrix which to multiply from the right to the Toeplitz matrix.
- Returns:
Toeplitz @ x – Result of the matrix multiplication.
- Return type:
(M,) or (M, K) ndarray