Classification of gene expression data to determine subtype of samples is meaningful to research tumors in molecular biology level. It is also an important way to make further treatment plan for the patient. Particle swarm optimization (PSO) is proven to be an ineffective solution for classification and clustering in bioinformatics as it could not give a stable prediction result. In this study, a classifier based on the two layer particle swarm optimization (TLPSO) algorithm and uncertain training sample sets is established. Samples of diffuse large B cell lymphoma (DLBLC) gene expression data are used for training and validating. The classification stability and accuracy by the proposed TLPSO algorithm increase significantly compared with the results obtained by using algorithms known as PSO and Kmeans.