Cryptocurrency-predicting RNN Model – Deep Learning w/ Python, TensorFlow and Keras p.11



Welcome to the next tutorial covering deep learning with Python, Tensorflow, and Keras. We’ve been working on a cryptocurrency price movement prediction …

38 Comments

  1. The series is missing the Functional API type of model. It is also missing the unsupervised learning types of examples. And offcourse the one you said Audio!! I know this series was done two years ago and now you are busy in new nnfs series but it would be great if you could add this things as well. Thanks! ✌🏻

  2. hm 2 yrs later the code has quite a few problems with the latest tensorflow 2.x such as Fail to find the dnn implementation that was solved by using tensorflow.compat.v1, and Failed to format this callback filepath

  3. doesn't train_x contain data of all the four cryptocurrencies so while your running the model for a single cryptocurrency doesn't it include all the four cryptocurrency columns as input

  4. Hey, I'm new to Python and tensor flow and have just finished the tut. I want to start experimenting but i can't get model.predict to work, or really know how to structure the data for it. Would anyone be able to give me a hand?

  5. Hey sentdex! , you have a unique way  in your tutorials , and i enjoy watching them 
    I just wonder if you can explain how to create a proper sequence  
    from currently  ‘live raw data’ sequences
    that currently happing in the stock market, that is a
    sequences that fits to the previously created model, properly. 
    how to preprocessing it in the why preprocessing(df)  function do when it was trained?do i need to use the size of the validation df? when scaling and preprocessing it ? or i can use any size that i want 
    for example : 
    if the 5% of the the trained data was 1000
    do i need to preprocess 1000 latest values? from the ‘live data’
    and use then the latest one from them? when making a predication using the model predict method 
    the main question is how to feed a proper preprocessed data from currently happing live raw data, into a previously created model ?

  6. Great tutorial! Thanks a lot for doing this @sentdex. You are amazing!

    If you are getting a 'val_acc KeyError' when using ModelCheckpoint, just replace the 'val_acc' in filepath and the parameters to ModelCheckpoint with 'val_accuracy'.
    Ohh, and also use '.hd5' instead of '.model'.

    Sample code (I separated formatting part just for ease of understanding):
    checkpoint_filepath = "models/RNN_Final-{epoch:02d}-{val_accuracy.3f}.hd5"
    checkpoint = ModelCheckpoint(filepath=checkpoint_filepath, monitor='val_accuracy', verbose=1, save_best_only=True, mode='max')

  7. Everything was working fine until the last part when you build rnn. But then an error pops up while you run it on command prompt. Is there any other way to observe output and making graph
    rather than using cmd and tensor website. Can you explain the last part in the video that starts after 13 minutes.

  8. hey sentdex uhmmm I love your tutorials man! learned a lot 😀

    I got a question hmmm is this really it? i think you forgot to remove the input_shape of the last to LSTM layers

    model.add(LSTM(128,activation="relu",input_shape=(train_x.shape[1:]),return_sequences=True))

    model.add(Dropout(0.1))

    model.add(BatchNormalization())

    the input_shape() should be removed right cause input_shape only goes at the first layer where it is obviously the input layer right? THANKSSSSSSSSSSSSSSS 😀

  9. Hi, I was trying to understand the code but I think I'm missing something. You have created a dataframe with all the four cryptocurrencies, then you put the predictions of only one you want to train. The point is that as inputs we have the values of all the 4 cryptoc. and as output just the change of one. This is what I think it does, am I wrong? if not why we do this? shouldn't we would want to have 4 future and target columns, and THEN gather statistics testing just on one specific cryptoc.?

  10. I liked the video but only from mechanics perspective … a model aiming to classify with 2 classes having 50% accuracy is as good as … rolling the dice 😉 The world needs deeper understanding of things – beyond just mechanics of putting together (pretty much copying) Keras layers and operating them …

  11. Could you finish off this series showing how to actually predict results using your saved model. I've seen your earlier videos where you are using the saved models for image matching. Also seen other videos where they are predicting the actual price in the future. Your method is to predict a buy or sell, I'm curious how you would go about loading the model to predict on live or even test data to produce a buy or sell response? Kinda stuck not knowing how to use all the information I learned from this series.

    Love the videos, learnt a lot from you with no previous background in the field!

  12. First of all thank you for sharing your knowledge. I am studying so many new things from your video tutorial series and it would be great if you can teach 'how to work on speech using neural network – offline speech recognition using keras' ..thank you again.

  13. Can someone please explain how to load this model and send parameters to "predict"?

    I believe it may be something like this, but I don't know what are the expected parameters:

    model = tf.keras.models.load_model("models/60-SEQ-3-PRED-1585503167");
    prediction = model.predict(main_pred)
    print(prediction)

  14. Thanks for your tutorial series! One thing I don't understand:
    Your labels are classes '0' and '1'. You use an output layer with size 2 with a softmax activation. Why? Shouldn't your output layer be a "regression" with size 1? Or it can be size 2 but then you have to encode your classes (one-hot)? I really don't get thits into my mind.. maybe someone can help me out?

  15. If you are doing audio please include Wavenet from Google. I specifically wanted to see how do you explain the receptive fields in Wavenet because I did not understand that very wel.

  16. I'm getting an error when running the code from CMD

    , line 2, in <module>

    from sklearn import preprocessing

    ModuleNotFoundError: No module named 'sklearn'

    Any idea what the issues is? sklearn is already installed in my conda env

  17. Anyone got an unusual AttributeError: 'str' object has no attribute 'shape'? It's so weird that the error message points to the last line of 'callbacks=[tensorboard, checkpoint]' as the location of this problem, although adding a line of code to check the shape of the training data all the way until the error line shows a correct data type of numpy array.

  18. SentDex – I think there is an error due to the labels not being arrays, but instead being lists and trying to label X arrays. This was the case when I tried to implement the function and I had to return np.array(x) and nparray(y) – thoughts?

  19. Hi. Sentdex, if you ask me, this whole series about market prices, need a re-evaluation and recording, this is a big potential use case for neural network, but many of the things you do here are not the best cases to work with. I would really appreciate if you start a whole new series and not only work with prices but also add some indicators to the whole game. Use two types of prediction: regression and classification. Let us see how each one of the two will work. At the end, we can even use both and predict both directions and use both predictions to have better results in real-time data. It's up to you if you want to drop sometime on this project and redo the whole thing without some of the issues we read in the comments or not. But I think the audience for this is not small.

Leave a Reply

Your email address will not be published.


*


32 + = 40