wilsonrljr/sysidentpy

steps_ahead not simulating next steps in SimulateNARMAX

Lalith-Sagar-Devagudi opened this issue · 2 comments

return self._n_step_ahead_prediction(

bug
When trying to simulate duffing equation

x_1 = 1.0 x_2
x_2 = -0.15 x_1 + 2.75 x_2 - 1.0 x_2^3

by giving steps_ahead = 2 or more, it is still predicting the one step forward for all the given test values. And it cannot simulate with out the steps_ahead parameter and also when steps_ahead = 50 or more. Please see the respective screenshots of the simulations.

ident_model = np.array([
      [1001, 1001, 1001],
      [1001,    0,    0],
      [2001,    0,    0],
       ])


s = SimulateNARMAX(basis_function=Polynomial(degree=3), calculate_err=True, estimate_parameter=True, extended_least_squares=True)
yhat_simulate = s.simulate(
    X_train=x_train,
    y_train=y_train,
    X_test=x_test,
    y_test=y_test,
    model_code=ident_model,
    steps_ahead=2)

without steps_ahead
wostepahead
steps_ahead = 1
wstepahead1
steps_ahead = 2
wstepahead2nmor
steps_ahead = 50
wstepahead50
steps_ahead = 100
wstepahead100

Thank you very much for this very insightful and helpful project.

Hey Lalith! Thank you for creating the issue. The issue is only with the 1 step ahead prediction and fix will be on next update. You can use the solution we talked about on discord in the meantime!

fixed in v0.3.0