I want to find the position of several devices using at least distance measurements. These measurements are done using a radio, and it might be that not all devices are in radio range (no distance measurement can then be done). All devices are taking turns on being the "distance measurement master", while the rest of the devices are acting as "distance measurement slaves".
The (training) data generated looks something like this (all the numbers are totally random):
The numbers under slave_x are distances in millimeter, and NaN means that there were no radio contact (no distance measurement done).
I am able to train a model using TensorFlow (Keras) that to my understanding uses regression (Mean Absolute Error):
n_inputs = training_features_normalized.shape n_outputs = training_labels.to_numpy().shape model = Sequential() model.add(Dense(512, input_dim=n_inputs, kernel_initializer='he_uniform', activation='selu')) model.add(Dense(512, activation='selu')) model.add(Dense(512, activation='selu')) model.add(Dense(512, activation='selu')) model.add(Dense(512, activation='selu')) model.add(Dense(512, activation='selu')) model.add(Dense(n_outputs)) model.compile(loss='mae', optimizer='adam') model.fit(training_features_normalized, training_labels.to_numpy(), verbose=1, epochs=20)
'training_features_normalized' consists of the columns:
'master', 'slave_0', 'slave_(...)' and
slave_n (normalization has been done).
'training_labels' consists of the columns:
This trained model gets good at predicting
master_y_coordinate for nodes (positions and distances) that are included in the training data, but the model is bad at predicting the position of devices that are not included in the training data.
So my question is:
Is there a way to train a model using this kind of training data so that the model can predict the position of "new" nodes with "new" positions (positions and relating distance measurements that are not included in the training data)?