Created
November 26, 2019 06:37
-
-
Save curiousily/02f6c7448069dce96cd3f74be4795e29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_dataset(X, y, time_steps=1): | |
Xs, ys = [], [] | |
for i in range(len(X) - time_steps): | |
v = X.iloc[i:(i + time_steps)].values | |
Xs.append(v) | |
ys.append(y.iloc[i + time_steps]) | |
return np.array(Xs), np.array(ys) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, can you help me to define such code