Accurately determining the indoor location of mobile devices has garnered great interest due to its significant challenge in locating sources due to non-line-of-sight propagation and multipath effects. To address this challenge, This paper proposes a new approach to indoor positioning that utilises channel state information (CSI) and machine learning (ML) techniques to improve Accuracy. The proposed method extracts subcarrier amplitude and phase differences from CSI data to create fingerprints, which are then clustered to identify the number of groups of data and split into two sub-databases using a threshold. The ML algorithms and network architecture are used to train both sub-databases of fingerprints. Experiments conducted in a standard indoor environment demonstrate the effectiveness of the proposed method.