The integration of random forest and LASSO regression elevated our understanding of COPD and T2DM, with ROC curve analysis verifying the diagnostic efficacy of identified hub genes, particularly CCR1 and ITPR3. Here, CCR1 is linked to type 2 diabetes mellitus.