Hence, this study utilized various machine learning models for prediction and showed that factors such as smoking history, hypertension, and opioids are associated with thyroid-related adverse events in cancer patients receiving PD-1/PD-L1 inhibitors. Here, PDCD1 is linked to thyroid gland disorder.