BACKGROUND: Assessing cognitive function in patients with chronic obstructive pulmonary disease (COPD) is crucial for ensuring treatment efficacy and avoiding moderate cognitive impairment (MCI) or dementia. We aimed to build better machine learning models and provide useful tools to provide better guidance and assistance for COPD patients' treatment and care. METHODS: A total of 863 COPD patients from a local general hospital were collected and screened, and they were separated into two groups: cognitive impairment (356 patients) and cognitively normal (507 patients). The Montreal Cognitive Assessment (MoCA) was used to test cognitive function. The swarm intelligence optimization algorithm (SIOA) was used to direct feature weighting and hyperparameter optimization, which were considered simultaneous activities. A self-assigning feature weights and residual evolution (SAFWRE) algorithm was built on the concept of linear and nonlinear information fusion. RESULTS: The best method in SIOA was the circle search algorithm. On the training set, SAFWRE's ROC-AUC was 0.9727, and its PR-AUC was 0.9663
on the test set, SAFWRE's receiver operating characteristic-area under curve (ROC-AUC) was 0.9243, and its precision recall-area under curve (PR-AUC) was 0.9059, and its performance was much superior than that of the control technique. In terms of external data, the classification and prediction performance of various models are comprehensively evaluated. SAFWRE has the most excellent classification performance, with ROC-AUC of 0.8865 and pr-auc of 0.8299. CONCLUSION: This work develops a practical visualization system based on these weight attributes which has strong application importance and promotion value.