IntroductionAtopic dermatitis (AD) is an allergic disease with extreme itching that bothers patients. However, diagnosing AD depends on clinicians’ subjective judgment, which may be missed or misdiagnosed sometimes.MethodsThis paper establishes a medical prediction model for the first time on the basis of the enhanced particle swarm optimization (SRWPSO) algorithm and the fuzzy K-nearest neighbor (FKNN), called bSRWPSO-FKNN, which is practiced on a dataset related to patients with AD. In SRWPSO, the Sobol sequence is introduced into particle swarm optimization (PSO) to make the particle distribution of the initial population more uniform, thus improving the population’s diversity and traversal. At the same time, this study also adds a random replacement strategy and adaptive weight strategy to the population updating process of PSO to overcome the shortcomings of poor convergence accuracy and easily fall into the local optimum of PSO. In bSRWPSO-FKNN, the core of which is to optimize the classification performance of FKNN through binary SRWPSO.ResultsTo prove that the study has scientific significance, this paper first successfully demonstrates the core advantages of SRWPSO in well-known algorithms through benchmark function validation experiments. Secondly, this article demonstrates that the bSRWPSO-FKNN has practical medical significance and effectiveness through nine public and medical datasets.DiscussionThe 10 times 10-fold cross-validation experiments demonstrate that bSRWPSO-FKNN can pick up the key features of AD, including the content of lymphocytes (LY), Cat dander, Milk, Dermatophagoides Pteronyssinus/Farinae, Ragweed, Cod, and Total IgE. Therefore, the established bSRWPSO-FKNN method practically aids in the diagnosis of AD.