WhiteNoise#

class skfda.misc.covariances.WhiteNoise(*, variance=1)[source]#

Gaussian covariance function.

The covariance function is

\[\begin{split}K(x, x')= \begin{cases} \sigma^2, \quad x = x' \\ 0, \quad x \neq x'\\ \end{cases}\end{split}\]

where \(\sigma^2\) is the variance.

Heatmap plot of the covariance function:

from skfda.misc.covariances import WhiteNoise
import matplotlib.pyplot as plt

WhiteNoise().heatmap(limits=(0, 1))
plt.show()
../../../_images/skfda.misc.covariances.WhiteNoise_0_0.png

Example of Gaussian process trajectories using this covariance:

from skfda.misc.covariances import WhiteNoise
from skfda.datasets import make_gaussian_process
import matplotlib.pyplot as plt

gp = make_gaussian_process(
        n_samples=10, cov=WhiteNoise(), random_state=0)
gp.plot()
plt.show()
../../../_images/skfda.misc.covariances.WhiteNoise_1_0.png

Default representation in a Jupyter notebook:

from skfda.misc.covariances import WhiteNoise

WhiteNoise()
\[K(x, x')= \begin{cases} \sigma^2, \quad x = x' \\0, \quad x \neq x'\\ \end{cases} \\\text{where:}\begin{aligned}\qquad\sigma^2 &= 1 \\\end{aligned}\]
2025-07-16T14:46:35.704667 image/svg+xml Matplotlib v3.10.3, https://matplotlib.org/
2025-07-16T14:46:35.619068 image/svg+xml Matplotlib v3.10.3, https://matplotlib.org/

Methods

heatmap([limits])

Return a heatmap plot of the covariance function.

to_sklearn()

Obtain corresponding scikit-learn kernel type.

Parameters:

variance (float)

heatmap(limits=(-1, 1))[source]#

Return a heatmap plot of the covariance function.

Parameters:

limits (tuple[float, float])

Return type:

Figure

to_sklearn()[source]#

Obtain corresponding scikit-learn kernel type.

Return type:

Kernel

Examples using skfda.misc.covariances.WhiteNoise#

One-way functional ANOVA with synthetic data

One-way functional ANOVA with synthetic data