gpflux.layers.basis_functions.fourier_features.random.orthogonal#

Module Contents#

_sample_chi_squared(nu: float, shape: gpflux.types.ShapeType, dtype: gpflow.base.DType) gpflow.base.TensorType[source]#

Draw samples from Chi-squared distribution with nu degrees of freedom.

See https://mathworld.wolfram.com/Chi-SquaredDistribution.html for further details regarding relationship to Gamma distribution.

_sample_chi(nu: float, shape: gpflux.types.ShapeType, dtype: gpflow.base.DType) gpflow.base.TensorType[source]#

Draw samples from Chi-distribution with nu degrees of freedom.

_ceil_divide(a: float, b: float) int[source]#

Ceiling division. Returns the smallest integer m s.t. m*b >= a.

class OrthogonalRandomFeatures(kernel: gpflow.kernels.Kernel, n_components: int, **kwargs: Mapping)[source]#

Bases: gpflux.layers.basis_functions.fourier_features.random.base.RandomFourierFeatures

Orthogonal random Fourier features (ORF) [YSC+16] for more efficient and accurate kernel approximations than RandomFourierFeatures.

Parameters:
  • kernel – kernel to approximate using a set of Fourier bases.

  • n_components – number of components (e.g. Monte Carlo samples, quadrature nodes, etc.) used to numerically approximate the kernel.