Welcome to nr1-github Discussions! #98
Replies: 2 comments 2 replies
-
docker run |
Beta Was this translation helpful? Give feedback.
-
import numpy as np Load CSV datadef load_csv_data(csv_file_path): Preprocess datadef preprocess_data(data, columns_to_drop):
Build LSTM modeldef build_model(input_shape): Train LSTM modeldef train_model(model, x_train, y_train): Predict stock price and decide whether to buy or selldef predict_price(model, x_test, scaler, last_known_price):
Evaluate model accuracy with RMSE metricdef evaluate_model(model, x_test, y_test, scaler):
Add noise to data for data augmentationdef add_noise(data, noise_factor): Load and preprocess datadata = load_csv_data('stock_prices.csv') Data augmentation by adding noisex_train_noisy = add_noise(x_train, 0.1) Build and train modelmodel_input_shape = (x_train.shape[1], x_train.shape[2]) Evaluate model accuracyrmse = evaluate_model(model, x_test, y_test, scaler) Predict future stock priceslast_known_price = data['Close'].iloc[-1] Print predicted future pricesprint(" |
Beta Was this translation helpful? Give feedback.
-
👋 Welcome!
Hello from New Relic Labs - we are the maintainers of the nr1-github repo, and we're using Discussions as a place to connect directly with members of our community.
If you have questions to ask or ideas you'd like to share, please feel free to start a discussion.
If you'd like to report a bug, or submit a feature request, go ahead and open up an issue.
We are a small team so we might not be able to respond right away, but rest assured we are keeping an eye on this space - your input is important to us!
Beta Was this translation helpful? Give feedback.
All reactions