eqdisco.dynamics.NARXRegressor#

class eqdisco.dynamics.NARXRegressor(estimator=None, na=2, nb=2, nk=1, input_names=None, output_name='y')[source]#

Bases: BaseEstimator

NARX model identified by any eqdisco regressor.

Parameters:
estimatorestimator, optional

Regressor fitted on the lagged regressors (default GPOLSRegressor).

na, nb, nkint

Output order, input order, input delay.

input_nameslist of str, optional
output_namestr, default=”y”
Attributes:
estimator_the fitted regressor
equation_Equation

\(y(k)\) as a function of the lagged variables.

regressor_names_list of str
predict(u, y)[source]#

One-step-ahead prediction from measured outputs (first t0_ samples are copied).

score(u, y, mode='simulation')[source]#

\(R^2\) of the free-run simulation (mode="simulation") or of the one-step prediction.

simulate(u, y_init)[source]#

Free-run simulation: predictions are fed back as past outputs.

Parameters:
uarray of shape (T,) or (T, m)

Input sequence (None for NAR models; then y_init sets the length via its own length and the simulation horizon equals len(y_init)).

y_initarray

Initial outputs; its first t0_ values are used.