Sorry, I am a newbie and would like to ask you why this code in:
features = len(X[0])
samples = X.shape[0]
train_len = 25
input_len = samples - train_len
I = np.zeros((samples - train_len, train_len, features))
for i in range(input_len):
temp = np.zeros((train_len, features))
for j in range(i, i + train_len - 1):
temp[j-i] = X[j]
I[i] = temp
Is there any basis for doing this, but if I use X_train = np.reshape(X, (X.shape[0],X.shape[1],1)) is this okay, but if I do this, the result is not very good.
Sorry, I am a newbie and would like to ask you why this code in:
features = len(X[0])
samples = X.shape[0]
train_len = 25
input_len = samples - train_len
I = np.zeros((samples - train_len, train_len, features))
for i in range(input_len):
temp = np.zeros((train_len, features))
for j in range(i, i + train_len - 1):
temp[j-i] = X[j]
I[i] = temp
Is there any basis for doing this, but if I use X_train = np.reshape(X, (X.shape[0],X.shape[1],1)) is this okay, but if I do this, the result is not very good.