Created
September 16, 2022 19:05
-
-
Save under0tech/2af80e3dc609d1f5a0a6de99ce35fd83 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
# GET PREDICTIONS | |
predictions = [] | |
for step in LOOKUP_STEPS: | |
df, last_sequence, x_train, y_train = PrepareData(step) | |
x_train = x_train[:, :, :len(['close'])].astype(np.float32) | |
model = GetTrainedModel(x_train, y_train) | |
last_sequence = last_sequence[-N_STEPS:] | |
last_sequence = np.expand_dims(last_sequence, axis=0) | |
prediction = model.predict(last_sequence) | |
predicted_price = scaler.inverse_transform(prediction)[0][0] | |
predictions.append(round(float(predicted_price), 2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment