Skip to content

BUG: ARIMA exog_names expands in each fit. #1691

Closed

Description

@josef-pkt

trying out the example from test_arima. small sample

If I call fit repeatedly, then summary() raises an exception.

It looks like exog_names is appended in each call of fit.

    y = [-1214.360173, -1848.209905, -2100.918158, -3647.483678, -4711.186773]
    mod = ARIMA(y, (1, 0, 2))

>>> mod.exog_names
['const', 'const', 'const', 'ar.L1.y', 'ma.L1.y', 'ma.L2.y', 'ar.L1.y', 'ma.L1.y', 'ma.L2.y', 'ar.L1.y', 'ma.L1.y', 'ma.L2.y']

>>> res = mod.fit(disp=0, start_params=[np.mean(y), .1, .1, .1])
>>> mod.exog_names
['const', 'const', 'const', 'const', 'ar.L1.y', 'ma.L1.y', 'ma.L2.y', 'ar.L1.y', 'ma.L1.y', 'ma.L2.y', 'ar.L1.y', 'ma.L1.y', 'ma.L2.y', 'ar.L1.y', 'ma.L1.y', 'ma.L2.y']

>>> res = mod.fit(disp=0, start_params=[np.mean(y), .1, .1, .1])
>>> mod.exog_names
['const', 'const', 'const', 'const', 'const', 'ar.L1.y', 'ma.L1.y', 'ma.L2.y', 'ar.L1.y', 'ma.L1.y', 'ma.L2.y', 'ar.L1.y', 'ma.L1.y', 'ma.L2.y', 'ar.L1.y', 'ma.L1.y', 'ma.L2.y', 'ar.L1.y', 'ma.L1.y', 'ma.L2.y']

working in a plain Windows shell in py3.3 virtualenv

Activity

  1. added this to the 0.7 milestone on Jul 12, 2015
  2. josef-pkt commented on Jul 12, 2015

    @josef-pkt
    MemberAuthor

    reopening because there is still the problem if users call fit with different trend arguments.

    #2526 fixes the case when the model stays the same.

  3. modified the milestones: 0.9, 0.7 on May 30, 2016
  4. josef-pkt commented on Apr 17, 2018

    @josef-pkt
    MemberAuthor

    postponed to 0.10
    trend should go out of fit, it is a data/model keyword and not a fit keyword.
    If we change that, then there is nothing to fix here.

  5. modified the milestones: 0.9, 0.10 on Apr 17, 2018
  6. bashtage commented on Jul 19, 2019

    @bashtage
    Member

    Fixed in master. ARMA is deeply broken since the model doesn't follow the immutable pattern. Hopefully, @ChadFulton will unify ARMA/ARIMA/SARIMAX with a single implementation.

  7. modified the milestones: 0.10, 0.11 on Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions