geometric_kernels.feature_maps.deterministic¶
This module provides the DeterministicFeatureMapCompact
, a
Karhunen-Loève expansion-based feature map for those
DiscreteSpectrumSpace
s, for which the eigenpairs
are explicitly known.
Module Contents¶
- class geometric_kernels.feature_maps.deterministic.DeterministicFeatureMapCompact(space, num_levels)[source]¶
Bases:
geometric_kernels.feature_maps.base.FeatureMap
Deterministic feature map for
DiscreteSpectrumSpace
s for which the actual eigenpairs are explicitly available.- Parameters:
space (geometric_kernels.spaces.DiscreteSpectrumSpace) – A
DiscreteSpectrumSpace
space.num_levels (int) – Number of levels in the kernel approximation.
- __call__(X, params, normalize=None, **kwargs)[source]¶
- Parameters:
X (lab.Numeric) – [N, …] points in the space to evaluate the map on.
params (beartype.typing.Dict[str, lab.Numeric]) – Parameters of the kernel (length scale and smoothness).
normalize (beartype.typing.Optional[bool]) – Normalize to have unit average variance (if omitted or None, follows the standard behavior of
MaternKarhunenLoeveKernel
).**kwargs – Unused.
- Returns:
Tuple(None, features) where features is an [N, O] array, N is the number of inputs and O is the dimension of the feature map.
- Return type:
beartype.typing.Tuple[None, lab.Numeric]
Note
The first element of the returned tuple is the simple None and should be ignored. It is only there to support the abstract interface: for some other subclasses of
FeatureMap
, this first element may be an updated random key.