GaussMarkovModel#
- class pypillometry.signal.gaussmarkov.GaussMarkovModel(components, noise=0.0, fixed=())[source]#
Bases:
objectGauss-Markov model: a sum of components plus white measurement noise.
The state is the stack of the component states (block-diagonal dynamics); the observation is the sum of the component outputs plus noise with standard deviation noise.
- Parameters:
Notes
Parameters are named
"<component>.<param>"(e.g."ou0.tau") and"noise".thetaholds the log of the free parameters, the unconstrained vector used by the optimisers.Examples
>>> model = GaussMarkovModel([OU(1., 50.), Matern(2., 500., nu=2.5)], noise=0.1) >>> model.param_names ['ou0.sigma', 'ou0.tau', 'matern1.sigma', 'matern1.ell', 'noise'] >>> model.dim 4 >>> model.fix(["noise"]).free_names ['ou0.sigma', 'ou0.tau', 'matern1.sigma', 'matern1.ell']
Methods
autocovariance of the observations at lags tau (ms), with noise
Copy with parameters held fixed when fitting.
copy with the free parameters set from their logs theta
One-sided power spectral density of the observations at frequencies freq (Hz), in signal units squared per Hz, without the noise (white noise sampled at
fsaddsnoise^2 / (fs / 2)).Discrete-time model for sampling rate fs (Hz).
copy with the parameters names free again
semivariogram of the observations at lags tau (ms), with nugget
copy with the parameters in dict params changed
Details
- fix(params)[source]#
Copy with parameters held fixed when fitting.
- psd(freq)[source]#
One-sided power spectral density of the observations at frequencies freq (Hz), in signal units squared per Hz, without the noise (white noise sampled at
fsaddsnoise^2 / (fs / 2)).- Return type:
- variogram(tau)[source]#
semivariogram of the observations at lags tau (ms), with nugget
- Return type: