def test_autoarima_init(X_y_linear_trend): X, y = X_y_linear_trend sarimax = SarimaxWrapper(init_with_autoarima=True, autoarima_dict={"D": 1, "m": 2}) sarimax.fit(X[:-10], y[:-10]) first_params = sarimax.get_params() sarimax.fit(X[:-9], y[:-9]) second_params = sarimax.get_params() assert first_params == second_params
def test_deserialization(X_y_linear_trend, init_params): X, y = X_y_linear_trend sarimax = SarimaxWrapper(**init_params) sarimax.fit(X[:-10], y[:-10]) first_params = sarimax.get_params() re_sarimax = SarimaxWrapper(**first_params) re_sarimax.fit(X[:-10], y[:-10]) re_first_params = re_sarimax.get_params() assert first_params == re_first_params