covmats.CovKernelAsLinopViaFFT#
- class covmats.CovKernelAsLinopViaFFT(*args, **kwargs)[source]#
Represents a fast fourier transform covariance matrix.
FFT based operations if kernel is stationary or translation invariant and points are on a regular grid.
Notes
This FFT-based code is a reimplementation of Arvind Saibaba’s work (https://github.com/arvindks/kle).
TODO: add references.
- __init__(kernel, mesh_dim: float | ndarray[tuple[Any, ...], dtype[float64]] | Sequence[float], domain_shape: int | ndarray[tuple[Any, ...], dtype[int64]] | Sequence[int], len_scale: ndarray[tuple[Any, ...], dtype[float64]], nugget: float = 0.0, k: int = 100, is_use_preconditioner: bool = False) None[source]#
Initialize the instance.
- Parameters:
kernel (_type_) – _description_
mesh_dim (Union[NDArrayInt, Tuple[float, float]]) – _description_
domain_shape (Union[NDArrayInt, Tuple[int, int]]) – _description_
len_scale (NDArrayFloat) – _description_
nugget (float, optional) – _description_, by default 0.0
k (int, optional) – Number of local centers in the preconditioner. Controls the sparity of the preconditioner. It should be inferior to the number of points. By default 100.
is_use_preconditioner (bool) – Whether to build the preconditioner at instance creation and use it to solve Ax = b systems. The default is False.
Properties
Hermitian adjoint.
Transpose this linear operator.
Return the number of points covered.
Methods
Hermitian adjoint.
Matrix-matrix or matrix-vector multiplication.
Return the diagonal entries of the matrix (variances).
Return the number of counts.
Matrix-matrix multiplication.
Matrix-vector multiplication.
Set the comptors to zero.
Adjoint matrix-matrix multiplication.
Adjoint matrix-vector multiplication.
Solve Ax = b, with A, the current covariance matrix instance.
Explicit dense representation of the covariance matrix.
Transpose this linear operator.