Views
No views yet
1import tensorflow as tf
2import pickle
3import numpy as np
4
5# Load the model
6model = tf.keras.models.load_model('stage2_universal_lstm_20250705_170829.keras')
7
8# Load the scaler
9with open('stage2_scalers_20250705_170829.pkl', 'rb') as f:
10 scalers = pickle.load(f)
11
12# Prepare your data (X should be scaled using the same scaler)
13# X = your_data # Shape: (batch_size, sequence_length, features)
14# predictions = model.predict(X)stage2_universal_lstm_20250705_170829.keras: Main model filestage2_scalers_20250705_170829.pkl: Feature scalers for preprocessingstage2_metadata_20250705_170829.json: Model metadata and configurationstage2_architecture_20250705_170829.txt: Detailed architecture description@misc{lstm_stock_prediction_2025,
title={Universal LSTM Stock Prediction Model with Sentiment Analysis},
author={Jeng Yang},
year={2025},
url={https://huggingface.co/jengyang/lstm-stock-prediction-model}
}