## 2 Materials and Methods
During training, the error between the predicted and actual probabilities was used to update the weights on the neuron connections between layers so that the most relevant features or characteristics of the intensity distributions of the transmission eigenchannels were used to make an accurate port number prediction. We implemented the fully-connected neural network using the Keras deep learning framework with TensorFlow and the weights between layers were optimized using Adam [34] and trained using categorical cross-entropy loss. We used Keras's EarlyStopping function to determine an early stop for training if the sum of errors over the entire validation set did not decrease for 50 passes of the entire training dataset through the model. Training took approximately three hours on a 32 GB GPU. Decision tree classifiers [35] divide up the data into smaller and smaller subsets based on characteristics of the input data and the intensity distribution of the transmission eigenchannels, until they have a subset for each port with only intensity distributions that belong to that port. Generally, one-hot vector encodings are not used with decision trees, since they result in a long and narrow tree with many splits along the \"trunk\" of the tree. Because the one-hot 10-component vector is ten times longer than the label encoding one-component vector, this requires roughly ten times more splits to make the correct classification in all ten classes of the one-hot 10-component vector. Therefore, we utilized the label encoding. However, we also compared the accuracy between a decision tree trained with the label encodings and one trained with the one-hot vector encodings. Normalization has little effect on decision trees since there are no activation functions between branches; therefore, we used the same normalized dataset as with the neural network. We implemented the decision tree with the DecisionTreeClassifier from the scikit-learn Python framework. We used the Gini impurity function to measure the quality of the divisions, required at least two samples to make a division, did not limit the depth or number of divisions, and considered all the features when making divisions. Training took approximately one hour on one CPU. Since the decision tree classifier does not conduct validation during training, we verified that our model was not optimized for a particular subset of the data by using k-fold cross validation. The training and validation data, consisting of 76% of the overall data, was divided into five folds. We trained and tested the model five times with a different fold being chosen as the validation data each time, and the remaining folds were used to train the model. The testing data were then used for the final model's evaluation. We created two versions of the multilabel dataset because the 13-component dataset would have required us to change the final activation function of the neural network to the sigmoid activation function. The softmax activation function marks only the highest probability position in the vector as correct, while the sigmoid activation function can mark multiple positions as correct, given that they pass a given probability threshold. Therefore, to preserve the chosen neural network configuration, we tested the neural network on only the 30-component datasets and tested the decision tree on both the 13-component and 30-component datasets. A downside of neural networks is their opacity regarding the process of classification. While the initial layer corresponds to the values of the intensity distribution, the following hidden layers contain more neurons that account for features that relate the values to themselves, like the steepness of the curve they form. However, the precise features examined cannot be determined by analyzing the neural network, making this a black-box algorithm. On the other hand, the decision tree created by the decision tree classifier shows which exact value or linear combination of values led to a certain path being taken.