pyhctsa.operations.model_fit.gp_fit_across¶
-
pyhctsa.operations.model_fit.gp_fit_across(y, cov_func=
'covSEiso_covNoise', npoints=20)¶ Gaussian Process time-series modeling for local prediction.
Trains a Gaussian Process model on equally-spaced points throughout the time series and uses the model to predict its intermediate values. The hyperparameters are learned by maximizing the marginal likelihood; the noise standard deviation is bounded below by 1% of that of the data (see
_gp_learn_hyperp()).- Parameters:¶
- y : array-like¶
The input time series.
- cov_func : str or list¶
The covariance function, a gpml
covSum: the names of its components joined with underscores ('covSEiso_covNoise','covSEiso_covPeriodic_covNoise','covMaterniso3_covNoise','covRQiso_covNoise') or in the gpml form['covSum', ['covSEiso', 'covNoise']]. The only configuration hctsa instantiates is the default,'covSEiso_covNoise'(squared exponential plus noise).- npoints : int¶
The number of points through the time series to fit the GP model to. Default is 20.
- Returns:¶
Dictionary summarising the error and the fitted hyperparameters:
stde: the root-mean-square error of the predictive mean, compared with the series,meanabs_std: the mean absolute error of the predictive mean, in units of the predictive standard deviation at each time,stdmu: the standard deviation of the predictive mean,meanS,stdS: the mean and standard deviation of the predictive standard deviation,nlml: the negative log marginal likelihood (gpml’snlZ) of the whole series (or of the 2000 resampled points), divided by the number of points so it does not grow with the series length,logh1,logh2, …: the log hyperparameters of the covariance function (for'covSEiso_covNoise': length scale, signal amplitude, noise standard deviation),h_lonN: the fitted length scale divided by the series length (only for'covSEiso_covNoise').
All values are NaN if the fit fails, or if the training values are constant to within round-off (see
_gp_roundoff_constant()). If the training points show no correlation structure (the fitted model must beat its white-noise special case in a likelihood-ratio test, see_gp_beats_white_noise()), the length scale (logh1,h_lonN) is not identified, and is reported as the spacing of the training points, the bound the data allow; the other outputs approach those of white noise.- Return type:¶
dict