Seanny123 / da-rnn

Dual-Stage Attention-Based Recurrent Neural Net for Time Series Prediction
333 stars 118 forks source link

Data overlapping in train/test split #8

Open notonlyvandalzzz opened 5 years ago

notonlyvandalzzz commented 5 years ago

Current version of predict function creates overlapping batch 1st element' indexes for train and test X and y_history tensors. Last item from X in train is first item in X in test. And due to mentioned in issue #4 gap between y_hist and y_targ there is one sequence missing in last chunk of splitted y_pred: i.e. we have dummy dataset with numbers as targs from 1 to 60, out last item in last batch would be 58 with y_targ = [60] leaving time window with 59 number out of party

natezhenghy commented 5 years ago

Confirm this post. There are several mistakes in the indexing in the code.