Taking each iteration of Particle swarm optimization (PSO) algorithm as a time node, the change of population in PSO algorithm can be regarded as a time series model. Particle population learns and evolves in multiple time nodes, which can be regarded as a dependent behavior on leader particles. In the traditional particle swarm optimization algorithm, this dependence behavior is independent of time, and its consideration standard is only the fitness value of particles. We deeply study the leadership mechanism of PSO algorithm in order to find a more robust leadership mechanism and improve the ability of PSO algorithm to explore the solution space, by extending the dependence behavior in the time dimension, we propose an improved PSO algorithm with long-term and short-term memory ability. In order to verify its performance, in the experimental part, we select 32 public data sets in UCI data to find the optimal feature subset. In a large number of feature selection experiments. The experimental results proofed that the performance of proposed algorithms is better than some state of the art algorithms.