Last active
March 15, 2020 07:20
-
-
Save lylayang/e5755e0e2b012af90ccd878864e6e55d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
train_size = 900 | |
test_size = len(df_arr) - train_size | |
train, test = df_arr[0:train_size,:], df_arr[train_size:len(df_arr),:] | |
look_back = 30 | |
trainX, trainY = convert2matrix(train, look_back) | |
testX, testY = convert2matrix(test, look_back) | |
# reshape input to be [samples, time steps, features] | |
trainX = np.reshape(trainX, (trainX.shape[0], 1, trainX.shape[1])) | |
testX = np.reshape(testX, (testX.shape[0], 1, testX.shape[1])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment