Learn R Programming

USP (version 0.1.2)

FourierKernel: Kernel matrix for Fourier basis

Description

Calculates the kernel matrix, described in BKS2020USP for univariate continuous data when using the Fourier basis. This function is used in USPFourier.

Usage

FourierKernel(x, M)

Arguments

x

A vector in \([0,1]^n\) for some \(n\), containing the observations.

M

The maximum frequency of Fourier basis functions to compute.

Value

The kernel matrix \(K\), to be used in independence testing.

References

BKS2020USP

Examples

Run this code
# NOT RUN {
n=10; x=runif(n)
FourierKernel(x,5)
# }

Run the code above in your browser using DataLab