Giter Club home page Giter Club logo

Comments (2)

JordiCorbilla avatar JordiCorbilla commented on May 18, 2024

So you need to consider the nature of the LSTM as it will give you an output for next day. This will help you validate your signals.

To test the model output for tomorrow, you would need to feed the model with the most recent data point and use it to make a prediction. Here is an example of how to do this in Python (there should be a prediction example in my solution)

# import necessary libraries
import pandas as pd
from keras.models import load_model

# load the saved model
model = load_model('model.h5')

# load the most recent data point
data = pd.read_csv('data.csv')
latest_data = data.tail(1)

# preprocess the data (normalize, standardize, etc.)
# ... 

# create the input tensor
# ...

# make the prediction
prediction = model.predict(input_tensor)

# print the predicted value
print('Tomorrow\'s stock price prediction:', prediction)

In the code above, you would first load the saved model using the load_model() function from the Keras library. Then, you would load the most recent data point and preprocess it as needed to create the input tensor. Finally, you would use the predict() method of the model to make a prediction for tomorrow's stock price, and print the result to the console.

from stock-prediction-deep-neural-learning.

vijaycd avatar vijaycd commented on May 18, 2024

Thank you. I guess I have to normalize/standardize the same way as you have in your trained model before the prediction.

from stock-prediction-deep-neural-learning.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.