Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug-Fix Issue-#29 #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gopi-Vamsi-Penaganti
Copy link
Contributor

#29 Issue

Errors:

  1. AttributeError: 'Series' object has no attribute 'ix'
  2. TypeError: Addition/subtraction of integers and integer-arrays with Timestamp is no longer supported. Instead of adding/subtracting n, use n * obj.freq

Changes made in : File Location

Changes made:

  1. Replaced .ix with .iloc (as per pandas updated version)

Line-163

plt.plot((np.exp(train_series.ix[1:].tolist())-\
                             np.exp(insample_fit)))

Line 119 & 120:

train_series = series.ix[train_index]
test_series = series.ix[test_index]
  1. Line-160 to 162:

Changed From:

insample_fit = list(results.predict(train_series.index.min()+1, 
                                                train_series.index.max(),
                                                typ='levels')) 

To

insample_fit = list(results.predict(train_series.index.min() + 1*train_series.index.freq, 
                                                train_series.index.max(),
                                                typ='levels')) 

@smith-kyle
Copy link

I'm a little late to the party, but I noticed you all aren't using a notebook review tool and wanted to invite you to review this pull request with GitNotebooks: https://gitnotebooks.com/dipanjanS/practical-machine-learning-with-python/pull/37

It lets you do things like comment on rendered markdown and code cells, so might be an easy win for your PR reviews.

@@ -157,10 +157,10 @@ def arima_gridsearch_cv(series, cv_splits=2,verbose=True,show_plots=True):
plt.show()

# show error plot
insample_fit = list(results.predict(train_series.index.min()+1,
insample_fit = list(results.predict(train_series.index.min()+1*train_series.index.freq,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why we need the multiplication factor here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants