Neural Network in R - Input Data

0

I'm having a problem in the input data of a neural network, I'm working with entries of 5000 pairs of numbers, these numbers are shifts in X and Y, ie based on the previous frame and the current frame I can see which was the displacement and thus have a signal representing the movement. The image below shows a small sample of one of the entries that I should use for network training.

 x,y
-0.00351363, 0.000967466
0.139664, 0.0312345
0.175774, -0.00378994
0.458393, 0.116977
0.241508, -0.000456899
0.144307, 0.0148827
0.251653, 0.000391103
0.00184657, 0.0477789
0.026319, 0.0212102
0.179847, 0.0699048
0.245969, 0.0124811
0.0526478, -0.0191692
0.067206, 0.0421046
0.0491242, -0.0203557
0.348096, -0.0346274
0.134959, -0.132013
0.162158, 0.017853
0.121126, 0.0325144
0.215919, 0.0808862
0.152572, 0.0224511
0.743098, -0.0271121
0.442534, -0.00596414
0.323115, 0.0267839

When plotting the 5096 values of X and Y, the following graph is generated:

My question is, these data are values of pixel displacement, summarizing I am analyzing a specific motion in a video, in this movement I store the displacement that all the pixels did, I intend to train a neural network to detect this same movement in other videos. The question is how can I pass this information to the neural network, because I need to inform them that these values (which are exact 5096 pairs) correspond to the movement that I want to detect, just as I have similar movements but are not what I want to detect (it would be a supervised training ). How can I pass these data to the network, because until today I only trained network in time series and in this case would be several entries with 5096 values and whether these values represent the movement or not.

Ex:

Input 1: (5096 X values), (5096 Y values), (True)

Input 2: (5096 X values), (5096 Y values), (False)

Entry N: ...

Update 1

To simplify the problem of having two signals, I made the resultant of the vectors and thus obtaining only one graphic.

Butitisnoticeablethatitwouldbevery"exhausting" for any neural network to adjust to that, so I applied a signal filter to smooth it. Using the signal library, I applied the following filter:

resultante <- fftfilt(rep(1, 50)/50,resultante)

And with this I got the following result:

NowI'mhavingtroubletrainingtheMLPnetwork,becauseIcannotseemtogetalistforit.Mydataisorganizedasfollows:

MLPCode:

redeCA<-mlp(df$dados,df$saida,size=nNeuronios,maxit=maxEpocas,initFunc="Randomize_Weights",
            initFuncParams=c(-0.3, 0.3), learnFunc="Std_Backpropagation",
            learnFuncParams=c(0.1), updateFunc="Topological_Order",
            updateFuncParams=c(0), hiddenActFunc="Act_Logistic",
            shufflePatterns=F, linOut=TRUE) 

Error:

Error in checkInput(x, y) : 
  'x' has to be numeric, after a conversion to matrix
asked by anonymous 18.09.2018 / 05:04

0 answers