Maybe you looked at the code of very first article where I indeed made this mistake and mentioned this. Concerning this exact one, I split my data into train/test the following way:

— —

def create_Xt_Yt(X, y, percentage=0.9):
p = int(len(X) * percentage)
X_train = X[0:p]
Y_train = y[0:p]
X_train, Y_train = shuffle_in_unison(X_train, Y_train)
X_test = X[p:]
Y_test = y[p:]
return X_train, X_test, Y_train, Y_test

— —

You said “One stays in the training another goes to the test …”, but it’s not the case of this code. First I take first 90% of time series windows and use them as train data and nothing of that goes to the test set, which is last 10% of data. Yes, inside of train test I do shuffling, but nothing of it goes to the test set :)

Co-founder of consulting firm Neurons Lab and advisor to AI products builders. On Medium, I write about proven strategies for achieving ML technology leadership

Co-founder of consulting firm Neurons Lab and advisor to AI products builders. On Medium, I write about proven strategies for achieving ML technology leadership