## 3 Experimental Data Acquisition
In the LDA technique, we have calculated the mean of each class, the total mean of the datasets, the between-class matrix, and the within-class matrix step by step, and then we constructed the lower dimensional spaces as a final step. Then, any data can be projected with the final lower dimensional space to find the reduced and simpler vector. We applied LDA according to Equations (1)-(6) to reduce \(N\) to \(M\) features where \(M\leq N\). Let the collected RSS values be denoted as \(D_{nxm}\), where n is the total number of records, and N is the number of features. 1. Separate the RSS values to each class \(C_{c}\). From larger datasets, we assign each vector to the corresponding class: \[C_{c}=M_{r\times N}\] (1) where \(r\) is numbers of records in class \(C_{c}\), \(c\) is the class number (in our case \(c\)\(\varepsilon\)[1; 15] and \(r\leq n\)). 2. Calculate the mean of each class. This is used to show the effect of features in each class. The computation is done from the assigned data to each class and then, finally, we obtained a \(1\times M\) matrix, where \(M\) is the total number of classes. In our case, we have a total of \(1\times 15\) mean vectors: \[\mu_{c}=\frac{1}{n_{c}}\sum_{D_{i}\in C_{c}}^{n}D_{i_{c}}\] (2) where \(D_{i_{c}}\) is the matrix in class \(i\)\(\varepsilon\)\[\mu=\frac{1}{n}\sum_{i=1}^{n}D_{i}, \tag{3}\]
4. Calculate variances of the between-class matrix. This is calculated through computing the distance between the individual class mean and the global mean. This mainly uses lower-dimensional space and maximizes the between-class variance: \[S_{b}=\sum_{c=1}^{15}n_{c}\ (\mu_{c}-\mu)(\mu_{c}-\mu)^{T}\] (4)
5. Calculate the variances of the within-class matrix. This is conducted by minimizing the difference between the projected mean and the projected samples of each class, as shown in Equation (5): \[S_{w} =\sum_{c=1}^{15}\sum_{i=1}^{n_{c}}(D_{i,c}-\mu_{c})(D_{i,c}-\mu_{c})^{T}\] (5) where \(D_{i,c}\) is the \(i\)th sample in the \(c\)th class. 6. Construct a transformed matrix by combining Equations (4) and (5): \[W=S_{w}{}^{-1}S_{b}\] (6)
7. Calculate the eigenvalues and eigenvectors of the transformed matrix (\(W\)), and then sort the eigenvectors in descending order based on the eigenvalues to select M eigenvectors. \(M\) is the number of dimensions of the new feature space (\(M\leq N\)). Feature selections are handled as shown in Figure 2, where the larger variance ratio indicates the more important feature to represent the whole of the features. According to [33], the selected features should contain greater than 90% of the original data content. In our case, the selected features comprise the first top six features, which cover more than 95% of the information of the total features. Hence, our LDA application does not affect the information content of the original data. 8. Transform the original data, \(D_{nvm}\), through the lower M-dimensional space. The result will be the selected features that can represent the whole data to apply the proposed system in indoor localizations. In addition to reduced RSS features, we used 5-BSSIDs having maximum RSS values, because we observed that 5-APs giving the strongest RSS values in a grid are also continuing in a class. Moreover,  
Figure 2: Feature distributions for linear discriminant analysis (LDA)-based feature selections. each BSSID is unique for each AP, and the strength of the RSS values in different classes varies for APs. Hence, the selected BSSIDs help our prediction be more precise. To evaluate the system performances, the preprocessed data has been divided into training and testing sets through random selection. From the total working locations, 889 grids are used for training, and 158 grids are used for testing in both classification and regression schemes. In each dataset, the corresponding BSSIDs were appended as illustrated in Figure 1:0 The proposed system, MLP, has an I_365_365_365_365_O\({}_{n}\) structure, where I indicates the input vector, and \(O_{n}\) refers estimated numbers of outputs.