Repository navigation
Closed
Description
test_arima has a bunch of commented-out code, including:
# raises - start out of sample
# TODO: start out of sample is now allowed; remove this code
# assert_raises(ValueError, model._get_prediction_index, *(204, None, True))
# assert_raises(ValueError, model._get_prediction_index, *(204, None, False))
# assert_raises(ValueError, model._get_prediction_index, *('2010Q1', None, True))
# assert_raises(ValueError, model._get_prediction_index, *('2010Q1', None, False))
# raises - start out of sample
# TODO: remove these, start out of sample now allowed
# assert_raises(ValueError, model._get_prediction_index, *(311, None, True))
# assert_raises(ValueError, model._get_prediction_index, *(311, None, False))
# assert_raises(ValueError, model._get_prediction_index, *('2010', None, True))
# assert_raises(ValueError, model._get_prediction_index, *('2010', None, False))
Any reason to keep any of this?
Also, whats the deal with all of these (and several more similar blocks):
#NOTE: should raise
#start, end = 1,3
#fv = res1.model.predict(params, start, end)
## start < p, end 0 1959q3 - 1960q1
#start, end = 2, 4
#fv = res1.model.predict(params, start, end)
## start < p, end >0 1959q3 - 1971q4
#start, end = 2, 51
#fv = res1.model.predict(params, start, end)
## start < p, end nobs 1959q3 - 2009q3
#start, end = 2, 202
#fv = res1.model.predict(params, start, end)
## start < p, end >nobs 1959q3 - 2015q4
#start, end = 2, 227
#fv = res1.model.predict(params, start, end)
Metadata
Metadata
Assignees
Labels
No labels
Activity
josef-pkt commentedon Mar 19, 2018
The assert_raises blocks can be deleted, AFAICS. The seem to be obsolete based on the comment.
I don't know about the last part, but I wouldn't delete them without checking, i.e. What is the current behavior for those cases? and if there is something wrong, Do we have an open issue?
I have no idea without running the commented out code.
That is, you can run those example cases and check that they work correctly.
jbrockmendel commentedon Mar 19, 2018
Most of the
NOTE: should raiseblocks do in fact raise. One block does not. It is not commented-out right now, so its just the comment that is out of place.https://github.com/statsmodels/statsmodels/blob/master/statsmodels/tsa/tests/test_arima.py#L1447