Apress / hands-on-time-series-analylsis-python

Source Code for 'Hands-on Time Series Analysis with Python' by B V Vishwas and Ashish Patel
Other
355 stars 197 forks source link

Multivariate_Data_preparation Function seems incorrect #3

Open saravanan-natarajan opened 3 years ago

saravanan-natarajan commented 3 years ago

Thanks for this awesome repo, great learning In Custom_ts_multi_data_prep function X takes out indices (0, 47+1) and y takes indices (49, 59), rather y should take values from (48, 58) range (0, 48) means it takes 0-47 indices since 48 is exclusive.

indicey = range(i+1, i+1+ horizon)

Is it supposed to be ???

indicey = range(i, i+horizon)

Using this improves R2 as welll. Correct me if am wrong ??

Nevermetyou65 commented 2 years ago

I faced same problem here and I think the code should be as you described.