Repository navigation
ENH/BUG: Add check to AR instance to prevent bugs - #5997
Conversation
|
Hello @bashtage! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2019-07-24 10:04:53 UTC |
Codecov Report
@@ Coverage Diff @@
## master #5997 +/- ##
==========================================
+ Coverage 83.28% 83.42% +0.13%
==========================================
Files 606 606
Lines 95121 95375 +254
Branches 10393 10396 +3
==========================================
+ Hits 79221 79563 +342
+ Misses 13519 13445 -74
+ Partials 2381 2367 -14
Continue to review full report at Codecov.
|
976b009 to
dc2438b
Compare
|
Looks promising. I’ll do a proper review tomorrow. |
7d0f387 to
1befbc6
Compare
a600542 to
ea4dfd2
Compare
| # 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)) | ||
|
|
||
| # works - in-sample | ||
| # None | ||
| start_test_cases = [ |
There was a problem hiding this comment.
note to self: pytest.mark.parametrize
| # make an exogenous trend | ||
| # X = np.array(lrange(nobs)) / 20.0 | ||
| # add a constant | ||
| # y += 2.5 | ||
|
|
||
| from pandas import read_csv |
There was a problem hiding this comment.
note to self: just use pd.read_csv, already in the namespace
| ##rkf.params | ||
| modkf = ARMA(x, (1, 1)) | ||
| # rkf = mkf.fit((1,1)) | ||
| # rkf.params | ||
| reskf = modkf.fit(trend='nc', disp=-1) | ||
| dres = reskf | ||
|
|
||
| modc = Arma(x) |
There was a problem hiding this comment.
getting this into a separate module would be nice, since this Arma class needs to DIAF.
There was a problem hiding this comment.
Have worked it over more than once, I think the plan forward should be to thinly wrap SARIMAX to produce ARMA and ARIMAX that simplify the inputs (remove seasonal, and integration for ARMA). These will need to live in statespace, and then a FutureWarning can be added to ARMA and ARIMA. Less sure about AR, since a simple OLS AR is very useful for performance.
|
Generally looks really good. For the commented-out test code if you'll add FIXME markers to it so it doesn't fall through the cracks, I'll try to troubleshoot it in follow-ups. |
a4830b7 to
0feb0fa
Compare
Prevent refit except in cases where it does not break results instances closes statsmodels#3882 closes statsmodels#5985
0feb0fa to
ab0f955
Compare
|
There are a couple of places in the tests where commented-out code was left behind, I'll address in a follow-up. What do you think about using this same pattern for VAR? |
|
I think it is reasonable for VAR as well. I'm slowly working on a new version of VAR with a different name ( |
Prevent refit except in cases where it does not break results instances
Complete testing of AR
Clean files
NumPy's guide.
Details
Notes:
needed for doc changes.
then show that it is fixed with the new code.
verify you changes are well formatted by running
flake8is installed. This command is also available on Windowsusing the Windows System for Linux once
flake8is installed in thelocal Linux environment. While passing this test is not required, it is good practice and it help
improve code quality in
statsmodels.