Gaussian#
- class skfda.misc.covariances.Gaussian(*, variance=1, length_scale=1)[source]#
Gaussian covariance function.
The covariance function is
\[K(x, x') = \sigma^2 \exp\left(-\frac{||x - x'||^2}{2l^2}\right)\]where \(\sigma^2\) is the variance and \(l\) is the length scale.
Heatmap plot of the covariance function:
from skfda.misc.covariances import Gaussian import matplotlib.pyplot as plt Gaussian().heatmap(limits=(0, 1)) plt.show()
Example of Gaussian process trajectories using this covariance:
from skfda.misc.covariances import Gaussian from skfda.datasets import make_gaussian_process import matplotlib.pyplot as plt gp = make_gaussian_process( n_samples=10, cov=Gaussian(), random_state=0) gp.plot() plt.show()
Default representation in a Jupyter notebook:
from skfda.misc.covariances import Gaussian Gaussian()
\[K(x, x') = \sigma^2 \exp\left(-\frac{\|x - x'\|^2}{2l^2}\right) \\\text{where:}\begin{aligned}\qquad\sigma^2 &= 1 \\l &= 1 \\\end{aligned}\]Methods
heatmap
([limits])Return a heatmap plot of the covariance function.
Convert it to a sklearn kernel, if there is one.
Examples using skfda.misc.covariances.Gaussian
#
Classification methods
Outlier detection with FPCA