# A Novel Crowdsourcing-Assisted 5G Wireless Signal Ranging Technique in MEC Architecture
## 5 Experimental Verification and Results
### Framework Performance Analysis  
This study proposes a generalized crowdsourced wireless sensing framework for 5G base stations, which requires universal algorithms capable of achieving robust performance under diverse implementations. To validate the framework's versatility, we integrated three fingerprint-matching algorithms--k-nearest neighbors (KNN), decision trees, and random forests--into our system. The KNN algorithm operates on distance-based principles. Its core mechanism involves calculating distances (e.g., Euclidean, Manhattan, or cosine distances) between the target sample and training samples, selecting the k-nearest neighbors, and determining predictions through majority voting for classification tasks (e.g., floor identification) or averaging neighbor values for regression tasks (e.g., coordinate estimation). Decision trees recursively select optimal features for node splitting using metrics like information gain or Gini index, constructing hierarchical decision rules. From root to leaf nodes, each path represents a decision sequence, with leaf nodes storing the final predicted location information. Random forest, an ensemble method, enhances accuracy by aggregating predictions from multiple decision trees. It employs bootstrap sampling for tree diversity and random feature selection during node splitting. Final predictions are derived from majority voting (for classification) or averaging (for regression) across all trees. Figure 5: Experiment workflow of our framework. To ensure fair comparison and reproducibility, we adopted commonly used hyper-parameter settings for each algorithm based on prior work and empirical tuning on the UJIIndoorLoc dataset. For the k-nearest neighbors (kNN) model, we used a neighbor size \(k=3\) with Euclidean distance as the similarity metric. The decision tree model was configured with a maximum depth of 20 and a minimum of 5 samples per leaf to balance model complexity and overfitting. For random forest, we employed 200 estimators with a maximum depth of 25, using the default Gini impurity as the splitting criterion. For simulation validation, we utilized the UJIIndoorLoc dataset--a publicly available indoor WiFi fingerprint dataset from Universitat Jaume I, Spain--due to the absence of existing 5G base station sensing datasets. Collected by over 20 users across three buildings using 25 devices, this dataset contains 19,938 training samples. As shown in Table 2, each sample includes signal strength measurements from 520 access points, along with ground-truth coordinates, building, and floor information, providing a robust basis for framework evaluation. In the validation experiments, we assessed the positioning performance of various methods through four key metrics--building prediction error rate, floor prediction error rate, mean signal ranging error, and probability of coordinate error within 10 meters. The building prediction error rate quantifies how frequently the system misidentifies the user's building--for instance, incorrectly assigning a user in Building A to Building B--which directly reflects its ability to discern spatial boundaries in multi-building environments like campuses or shopping malls. The mathematical formation is as follows:  
\[\text{BER}=\frac{1}{N}\sum_{i=1}^{N}\mathbb{I}\left(\hat{b}_{i}\
eq b_{i}\right) \tag{6}\]  
where \(b_{i}\) is the ground-truth building label and \(\hat{b}_{i}\) is the predicted building label for the \(i\)-th sample, and \(\mathbb{I}(\cdot)\) is the indicator function. The floor prediction error rate measures vertical misjudgments, such as predicting Floor 2 or 4 when the user is on Floor 3, highlighting the system's sensitivity to vertical