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.
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?
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.
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.
Very clear in this video, thank you for your effort.
Very clear explanation, thanks!
Thank you for this.
At min 7.32 I guess W_hh is wrong
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.
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?
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.
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.
You could do the following:
from sklearn.model_selection import train_test_split
train, test = train_test_split(df, test_size=0.2)
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?
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.
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??
Nevermind, its at the end! Thanks.
heyy did can u plzz upload the notebook link?
You can find the notebook here:
github.com/SpencerPao/Data_Science/tree/main/GRU
Everything is blurry (?).