# Neural network input values belonging to classes

I need help on configuring a neural network. I would like to pass in accelerometer values (x,y,z) from two different sensors, and have the network compute the corresponding angle. I am providing close to 80,000 training data points for which I provide the accelerometer values and the corresponding angles. When I developed a neural network with only 1 sensor, the network performed and computed the desired angles quite well. However, the issue I am having with using two sensors is that the x,y,z values of the first sensor are all related (or belong to one class), and the x,y,z values of the second sensor are all related. How can I tell the neural network to consider the first set or combination of x,y,z accelerometer values together, and then the second set of x,y,z accelerometer values together, then somehow use these two sets of data together to evaluate the angle. Just a note, the accelerometer values essentially indicate the orientation of the sensor. So I need to consider the orientation of the two sensors in order to find my desired angle.

Any suggestions are much appreciated. I am using the neural network toolbox in Matlab, but am open to using other methods for analysis.

One way would be to constrain the connectivity of the network. For example, say the input layer contains values from the first accelerometer, followed by the second accelerometer: $[x_1, y_1, z_1, x_2, y_2, z_2]$. Split the first hidden layer into two halves. The first half only receives connections from the first three input units (corresponding to the first accelerometer). The second half only receives connections from the last three input units (corresponding to the second accelerometer. This is equivalent to having all-to-all connectivity, but forcing the weight matrix to be zero for 'non-connected' units. It's also equivalent to having separate, parallel input and hidden layers. Then, let the split hidden layer feed into a 'merged' hidden layer that receives all-to-all connections from the split layer. The network from here on out has standard architecture. You can stack up as many split hidden layers and full hidden layers as you want. Or, you could skip the full hidden layers and feed directly from a split hidden layer to the output.