Neural Network in R - Input Data
Neural Network in R - Input Data
I'm having a problem in the input data of a neural network, I'm working with inputs of 5000 number pairs, these numbers are shifts in X and Y. The image below shows a small sample of one of the inputs that I should use for network training .
When plotting these numbers I get the following:
My question is, I need a way to "join" these numbers and tell the neural network that this data is true (1), just as I have others that are false (0). I thought of a vector with n elements, where each one has the 5000 data and the information that this data is (0 or 1).
Ex: X, Y, [X, Y] [0], .... where X and Y are the 5000 values. I hope it has been made clear, and sorry for English. Just to note these values are shifts from frame to frame pixels. Thanks.
csv
my_file.csv
my.data$label <- 1
data frame
x
y
label
0
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy
I think this depends upon which function you will call to train your neural network (and what format the data have to be in). To import your data into R you can just try From the image you have posted it looks like a
csv
file.. so I would just try ` my.data <- read.csv('my_file.csv')` (replacemy_file.csv
with your actual file name) and to assign the labelmy.data$label <- 1
. This will create adata frame
with 3 columns, namedx
,y
, andlabel
.– konvas
Sep 18 '18 at 8:25