Indoor positioning plays a crucial role in various applications, including smart homes, healthcare, robotics, and asset tracking. However, achieving high positioning accuracy in indoor environments remains a significant challenge due to obstacles that introduce NLOS conditions and multipath effects. These conditions cause signal attenuation, reflection, and interference, leading to decreased localization precision. This research addresses these challenges by optimizing feature selection LOS, NLOS, and multipath classification within Ultra-Wideband (UWB) ranging systems. A systematic feature selection approach based on Pearson correlation is employed to identify the most relevant features from an open-source dataset, ensuring efficient classification while minimizing computational complexity. The selected features are used to train multiple machine-learning classifiers, including Random Forest, Ridge Classifier, Gradient Boosting, K-Nearest Neighbor, and Logistic Regression. Experimental results demonstrate that the proposed feature selection method significantly reduces model training and testing times without compromising accuracy. The Random Forest and Gradient Boosting models exhibit superior performance, maintaining classification accuracy above 90%. The reduction in computational overhead makes the proposed approach highly suitable for real-time applications, particularly in edge-computing environments where processing efficiency is critical. These findings highlight the effectiveness of Pearson correlation-based feature selection in improving UWB-based indoor positioning systems. The optimized feature set facilitates robust LOS, NLOS, and multipath classification while reducing resource consumption, making it a promising solution for scalable and real-time indoor localization applications.