Unlabeled samples and transformation matrix are two main parts of unsupervised and semi-supervised feature extraction (FE) algorithms. In this manuscript, a semi-supervised FE method, locality preserving projection in the probabilistic framework (LPPPF), to find a sufficient number of reliable and unmixed unlabeled samples from all classes and constructing an optimal projection matrix is proposed. The LPPPF has two main steps. In the first step, a number of reliable unlabeled samples are selected based on the training samples, spectral features, and spatial information in the probabilistic framework. In this way, the spectral and spatial probability distribution function is calculated for each unlabeled sample. Therefore, the spectral features and spatial information are integrated together with a joint probability distribution function. Finally, a sufficient number of unlabeled samples with the highest joint probability distribution are selected. In the second step, the selected unlabeled samples are applied to construct the transformation matrix based on the spectral and spatial information of the unlabeled samples. The adjacency graph is improved by using new weights based on spectral and spatial information. This method is evaluated on three data sets: Indian Pines, Pavia University, and Kennedy Space Center (KSC) and compared with some recent and well-known supervised, semi-supervised, and unsupervised FE methods. Various experiments demonstrate the efficiency of the LPPPF in comparison with the other FE methods. LPPPF has also considerable performance with limited training samples.