I’m wondering how to input geographic coordinates into a neural network, for example (x,y) coordinates or latitude/longitude, etc. I guess a neural network could learn that the components of a coordinate are related. But since I already know that, wouldn’t it help if I could tell the neural network? I can’t figure out how this might be done.
In particular, suppose I have training data with multiple coordinates and the prediction is also a coordinate. The domain I’m thinking of is indoor positioning where a phone reads signal strength from beacons with known locations and from that tries to infer the location of the phone. Let’s say the input data is (x1, y1, x2, y2, x3, y3, … xn, yn). x1 and y1 are the known coordinates of one beacon. Wouldn’t it be good to tell the neural network that x1 is related to y1 so it doesn’t bother considering the possibility that x1 is related to y2, for example?
I wonder if Convolutional Layers could be used, which are discussed in the lecture Additional Layer Types? It seems like I could define windows for the first 2 features (i.e. x1 and y1), the second 2, etc. But how does a Convolutional Layer combine the features? Does it average them? Sum them? Multiply them? Concatenate them? Is the method of fusing features configurable?
I tried to find the answer on my own and came across an article that mentions Feature Crosses. If I understood correctly, Feature Crosses allow you to tell a neural network that a latitude feature and a longitude feature belong together.
However, the article doesn’t provide a link explaining how to implement Feature Crosses with a Keras layer, it only provides a link to a TensorFlow glossary definition.
I tried searching for “keras feature cross” but could only find an unanswered question on stackoverflow: How use to Feature crosses with Keras Functional API.
So, my questions are as follows:
1] Generally, how do we inform a Neural Network about known relationships among input features? This is a general question where geographic data is just one example. I’m also curious about things like image classification where it seems important to know which pixels are close. Seems like Convolutional Layers are the answer, but could you please confirm?
2] Specifically, how do I input geographic coordinates to a Neural Network so that it’s clear which x coordinates belong to which y coordinates?
3] Even more specifically, where is a link to Keras documentation for the previous question?
Thank you in advance!