TARNNResult._from_fit#
- classmethod TARNNResult._from_fit(fit, model)[source]#
Assemble the public result from a raw fit and its specification.
The threshold variable is re-lagged here from the series or the external variable so that the stored copy is aligned with the effective sample rather than the full one.
- Parameters:
fit (
_NeuralThresholdFit) – The raw estimator output.model (
_NeuralThresholdModel[TARNNResult]) – The specification, read for the series, the order and the engine.
- Return type:
- Returns:
The assembled result.
Example
>>> import numpy as np >>> rng = np.random.default_rng(0) >>> model = TARNN(rng.standard_normal(300), order=1, delay=2) >>> res = TARNNResult._from_fit(model._fit_family(), model) >>> res.delay, res.nobs, res.threshold_values.shape (2, 298, (298,))