NSSDNResult#
- class cultivars.experimental.spectral.NSSDNResult(*, endog, time, exog, k, state_dim, alignment, transition, ordered_frequency, gating, objective, scaling, scale, emission, fittedvalues, resid, llf, nobs, n_params, sigma2, trend, amplitude_raw, amplitude, frequency, phase, phase_offset, gate, state, mix, history, predictor)[source]#
A fitted spectral decomposition network.
The complete decomposition the network emitted over the sample, the one-step conditional fit derived from it, the concentrated Gaussian likelihood of the one-step residuals, and the trained network as a callable
predictor. Composes rendering (summary, which is what a bare result prints), frame interop (to_pandas,to_dictwith every path as a column) and criterion-named comparison (information_criteria,compare).Every path has
rrows:r = nunder the filtered alignment, where rowtis the emission that reconstructsendog[t]from the state afterendog[t];r = n - 1under the predicted alignment, where rowiis the emission that predictsendog[i + 1]from the state afterendog[i].observedis the slice ofendogthe rows align with.fittedvaluesalways hasn - 1rows aligned withendog[1:]and is the one-step conditional prediction of each observation: the emission rows under the predicted alignment, the emissions throughn - 2under the filtered one (the paper’syhat[split - 1 : -1]againsty[split:]).- Variables:
endog – The full observed series.
time – The time grid.
exog – The covariates used, or
None.k – Number of components.
state_dim – Latent dimension.
alignment –
"filtered"or"predicted".transition – Transition kind.
ordered_frequency – Whether frequencies are strictly increasing in
k.gating – Whether a gate head was fitted.
objective – Prediction loss.
scaling – Scaling choice.
scale – The affine map between training units and the original scale.
emission –
(r,)the synthesized series,trend + components.sum(1).fittedvalues –
(n - 1,)one-step conditional predictions ofendog[1:].resid –
endog[1:] - fittedvalues.llf – Concentrated Gaussian log-likelihood of
resid.nobs – Effective sample size,
n - 1.n_params – Trainable parameter count.
sigma2 – Residual variance.
trend –
(r,)trend headB_t(Fig. 3).amplitude_raw –
(r, k)softplus amplitudeA_{t,k}before the gate.amplitude –
(r, k)gated amplitudeg_{t,k} A_{t,k}(Fig. 4).frequency –
(r, k)instantaneous angular frequencyomega_{t,k}, radians per unit time (Fig. 5).phase –
(r, k)cumulative phasetheta_{t,k}.phase_offset –
(r, k)phase offsetphi_{t,k}.gate –
(r, k)gateg_{t,k}in(0, 1)(Fig. 6); ones when gating is off.state –
(r, state_dim)latent stateh_t.mix –
(k,)learned mixing weightsw_k.history – Training losses by stage and step.
predictor – The trained network behind a numpy interface.
Note
Under the filtered alignment the emission at
thas seeny_t, soemissionis a reconstruction and its error is not a forecast error;fittedvaluesare the published one-step protocol and should be read against a random walk before being read as skill.llfis a concentrated Gaussian likelihood at a penalized fit andn_paramsthe nominal weight count, which overstates the effective freedom of a weight-decayed network, so criteria comparekwithin one configuration only. Withoutordered_frequencythe components are identified only up to permutation.See also
NSSDN– the specification that produces this.SpectralState– the measure-valued reading of the decomposition.
Attributes#
Akaike information criterion. |
|
Bayesian information criterion. |
|
|
|
|
|
Hannan-Quinn information criterion. |
|
AIC, BIC, and HQIC from |
|
|
|
|
|
|
|
|
|
One minus the one-step residual share of variance over the effective sample. |
|
|
Methods#
|
Rank this result and |
|
Every path of the decomposition, for the fitted sample or a new one. |
|
Recursive multi-step forecast from the end of the fitted sample. |
|
One-step conditional predictions over a sample. |
|
The decomposition read as a time-local spectral measure. |
|
The estimation summary, renderable as text, HTML, or a dataframe. |
|
The aligned outputs as plain arrays. |
|
The aligned outputs as a |