Localization has drawn significant attention in 5G due to the fast-growing demand for location-based service (LBS). Massive multiple-input multiple-output (M-MIMO) has been introduced in 5G as a powerful technology due to its evident potentials for communication performance enhancement and localization in complicated environments. Fingerprint-based (FP) localization are promising methods for rich scattering environments thanks to their high reliability and accuracy. The Gaussian process regression (GPR) method could be used as an FP-based localization method to facilitate localization and provide high accuracy. However, this method has high computational complexity, especially in large-scale environments. In this study, we propose an improved and low-dimensional FP-based localization method in collocated massive MIMO orthogonal frequency division
multiplexing (OFDM) systems using principal component analysis (PCA), the affinity propagation clustering (APC) algorithm, and Gaussian process regression (GPR) to estimate the user's location. Fingerprints are first extracted based on instantaneous channel state information (CSI) by taking full advantage of the high-resolution angle and delay domains. First, PCA is used to pre-process data and reduce the feature dimension. Then, the training fingerprints are clustered using the APC algorithm to increase prediction accuracy and reduce computation complexity. Finally, each cluster's data distribution is accurately modelled using GPR to provide support for further localization. Simulation results reveal that the proposed method improves localization performance significantly by reducing the location estimation error. Additionally, it reduces the matching complexity and computational complexity.