-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QUESTION (or Issue in documentation): X and Y arrays for trainr function #29
Comments
same question here. It's really confused to use, could you give more examples of using this package |
Here is an example which unfortunately does NOT work: calling
(i.e. dim2=1 for both X and Y as required, and 0<train<<dim1=1000, dim3=20) produces the error message
which is completely unexplainable for me. Addendum: As can be seen, I have a data set of 1000 samples with 20 elements each in X and I want to train a 20-to-1 network on (1000-train+1) elements in order to classify the sets into 3 classes, defined by target values in Y. |
Same question here. |
Hi- |
Hi Fatini Are you able to work with your dataset of 1000 samples having 20 to 1 network using RNN package? |
No, sorry. I don't use this packege any more, as I explained in my post above. |
To compare with the documentation of keras (which I am now also using): 3D tensor with shape (batch_size, timesteps, input_dim), (Optional) 2D tensors with shape (batch_size, output_dim). Similarly for the rnn package, you cannot train the model with formula approach, i.e. x and y must be supplied and their dimension must make sens: (sample, time steps, variable).
What is important to understand is that the network will see a 3D shape and not a 2D as for classical modeling in R so you must think in 3D. Being comfortable with the dimension in your dataset and how they make sens for what you want your neural network to do is mandatory to train it. As @faltinl mentioned, it is the same in keras where you need to specify the tensor dimension, in the rnn package, we tried to infer it from the inputs and put warning when mismatch are found. It is still not perfect though and more documentation could help. In case of @faltinl example with dim2=1, it will means there is only one time step which is not what you want to do if you used rnn. the error is not catch, thus the useless error message. In case of @starmessage dataset, I believe you have only one observation with 7 variable in input and 2 in output. If I assume you have 1000 row in such dataframe, the X dimension will be |
The documentation for functoin trainr of the package says
What is exactly samples, time variables in dimensions? Is it a consideration for time series? How can I use my existing time series data for prediction?
The text was updated successfully, but these errors were encountered: