ARNN#
- class cultivars.univariate.mean_function.ARNN(endog, *, order, engine=None)[source]#
Neural autoregression: one learned function of
orderlagged levels.The model \(y_t = f(y_{t-1}, \ldots, y_{t-p}) + \varepsilon_t\), with \(f\) fitted by the engine on the lag matrix and the innovation variance concentrated out. The default engine is a single-hidden-layer perceptron trained by L-BFGS with an L2 penalty on the weights and a handful of random restarts, so the fit is deterministic for a fixed
seedand the capacity is set byhidden_units. Order selection by the information criteria is meaningful within one engine configuration only.- Variables:
_endog – The validated series.
_order – Number of lagged levels.
_engine (
MeanFunctionEngine) – The training backend.
- Parameters:
- Raises:
SpecificationError – If
orderis not a positive integer.DimensionError – If
endogis not one-dimensional or is too short for the order.NumericalError – If
endogcontains non-finite values.
See also
ARNNResult– whatfit()returns.TARNN– one function per regime.AR– the linear model this generalizes.LSTAR– a parametric nonlinearity with interpretable coefficients.
References
Kuan, C.-M., & White, H. (1994). Artificial neural networks: An econometric perspective. Econometric Reviews, 13(1), 1-91.
Trapletti, A., Leisch, F., & Hornik, K. (2000). Stationary and integrated autoregressive neural network processes. Neural Computation, 12(10), 2427-2450.
Example
The learned map beats the linear one on the same lags:
>>> from cultivars.univariate.autoregression import AR >>> linear = AR(y, order=1).fit() >>> bool(res.ssr < np.sum(linear.resid**2)) True
Attributes#
Methods#
|
Train the mean function and concentrate out the variance. |