Skip to content

Instantly share code, notes, and snippets.

@curiousily
Created November 26, 2019 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curiousily/02f6c7448069dce96cd3f74be4795e29 to your computer and use it in GitHub Desktop.
Save curiousily/02f6c7448069dce96cd3f74be4795e29 to your computer and use it in GitHub Desktop.
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)
@esteria2222
Copy link

Hi, can you help me to define such code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment