Gaussian Processes¶
- class darts.models.filtering.gaussian_process_filter.GaussianProcessFilter(kernel=None, **kwargs)[source]¶
Bases:
FilteringModel
This model uses the
GaussianProcessRegressor
of scikit-learn to fit a Gaussian Process to the supplied TimeSeries. This can then be used to obtain samples from the Gaussian Process at the times of the TimeSeries.It can for instance be used to fill in missing (NaN) values from a TimeSeries.
- Parameters
kernel (sklearn.gaussian_process.kernels.Kernel, default: None) – The kernel specifying the covariance function of the Gaussian Process. If None is passed, the default in scikit-learn is used. Note that the kernel hyperparameters are optimized during fitting unless the bounds are marked as ‘fixed’.
**kwargs – Additional keyword arguments passed to
sklearn.gaussian_process.GaussianProcessRegressor
.
Methods
filter
(series[, num_samples])Fits the Gaussian Process on the observations and returns samples from the Gaussian Process, or its mean values if num_samples is set to 1.
- filter(series, num_samples=1)[source]¶
Fits the Gaussian Process on the observations and returns samples from the Gaussian Process, or its mean values if num_samples is set to 1.
- Parameters
series (
TimeSeries
) – The series of observations used to infer the values according to the specified Gaussian Process. This must be a deterministic series (containing one sample).num_samples (int, default: 1) – Number of times a prediction is sampled from the Gaussian Process. If set to 1, the mean values will be returned instead.
- Returns
A stochastic
TimeSeries
sampled from the Gaussian Process, or its mean if num_samples is set to 1.- Return type