Computes the white noise covariance function: $$k(s, t) = \sigma^2 \mathbf{1}_{s = t}$$
Details
where \(\mathbf{1}_{s = t}\) is 1 if \(s = t\) and 0 otherwise.
The white noise covariance function represents independent noise at each point. It can be added to other covariance functions to model observation noise.
Examples
# White noise covariance produces independent samples at each point
cov_func <- kernel.whitenoise(variance = 0.1)
t <- seq(0, 1, length.out = 50)
K <- cov_func(t)
# K is diagonal