[GRU] Applying and Understanding Gated Recurrent Unit in Python

Поділитися
Вставка
  • Опубліковано 22 сер 2024

КОМЕНТАРІ • 16

  • @bryanwu9215
    @bryanwu9215 Рік тому

    Very clear in this video, thank you for your effort.

  • @terryliu3635
    @terryliu3635 4 місяці тому

    Very clear explanation, thanks!

  • @dreamphoenix
    @dreamphoenix 2 роки тому

    Thank you for this.

  • @EinsteinNewtonify
    @EinsteinNewtonify 2 роки тому +2

    At min 7.32 I guess W_hh is wrong

  • @terryliu3635
    @terryliu3635 4 місяці тому

    Hi Spencer, could you pls help me understand why the initial GRU prediction generated a flat line? That indicates no pattern from all the years of gold prices have been “learned” by the first GRU model? Thanks.

  • @deviceticker5010
    @deviceticker5010 2 роки тому

    Thanks for the video. I have two doubts about the Multivariate Forecasting part at the end...
    1) How to inverse the MinMax scale for the prediction? I think it involves min_max_scaler.inverse_transform(), but please clarify.
    2) How would you use the .predict() on the entire dataset for graphing train, test, and the future prediction?

    • @SpencerPaoHere
      @SpencerPaoHere  2 роки тому

      1) To reverse your scale, assuming that you use MinMaxScaler(data) from scikit learn, you can use inverse_transform(scaled_data)
      2) Are referring to the "sliding window" approach? (quite common in the time industry). You wouldn't really use the entire dataset but a small amount of data to get the next data coming. You iterative through and prediction(s) using your previous predictions/historical data.

  • @zehanfarzana2762
    @zehanfarzana2762 Рік тому

    Thank you for this video. How do you split the data into training and testing set? I didn't find the step in the video.

    • @SpencerPaoHere
      @SpencerPaoHere  Рік тому +1

      You could do the following:
      from sklearn.model_selection import train_test_split
      train, test = train_test_split(df, test_size=0.2)

  • @SitiNurHasanah-kx3tx
    @SitiNurHasanah-kx3tx 3 роки тому

    thank you for creating this great tutorial. But, I still confuse about how to define the number of neuron in input, hidden and output layer?

    • @SpencerPaoHere
      @SpencerPaoHere  3 роки тому +1

      I'd start with the number of features equals to the number of input nodes for the Neural network. Now, identifying the number of hidden nodes and layers is definitely an art form. Lots of Cross validation and backtesting will be needed to judge how well your network performs and critique your model from there. I suggest looking at my GANS video on transfer learning as a good starting point.
      The output layer is entirely based on what you are trying to predict, very much dependent on the activation function. In general, if you have a regression problem, you can have 1 node. Else, if you have a classification problem, you can have c classes of output nodes. BUT, it really depends on what activation function you have which can substantially increase or decrease the number of nodes used in the output layer. So, it depends.

  • @Sorrel555
    @Sorrel555 Рік тому

    You started with a multivariate array... then at the end I only see the univariate Y values used as X and Y... what happened to x_scaled??

    • @Sorrel555
      @Sorrel555 Рік тому

      Nevermind, its at the end! Thanks.

  • @sakethgupta9047
    @sakethgupta9047 2 роки тому

    heyy did can u plzz upload the notebook link?

    • @SpencerPaoHere
      @SpencerPaoHere  2 роки тому

      You can find the notebook here:
      github.com/SpencerPao/Data_Science/tree/main/GRU

  • @paratracker
    @paratracker 7 місяців тому

    Everything is blurry (?).