dipanjanS / practical-machine-learning-with-python

Master the essential skills needed to recognize and solve complex real-world problems with Machine Learning and Deep Learning by leveraging the highly popular Python Machine Learning Eco-system.
Apache License 2.0
2.28k stars 1.65k forks source link

Bug-Fix Issue-#29 #37

Open Gopi-Vamsi-Penaganti opened 1 year ago

Gopi-Vamsi-Penaganti commented 1 year ago

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 commented 9 months ago

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.