Using machine learning algorithms to analyze the odds and predictors of complications of thyroid damage after radiation therapy in patients with head and neck cancer. This study used decision tree (DT), random forest (RF), and support vector machine (SVM) algorithms to evaluate predictors for the data of 137 head and neck cancer patients. Candidate factors included gender, age, thyroid volume, minimum dose, average dose, maximum dose, number of treatments, and relative volume of the organ receiving X dose (X: 10, 20, 30, 40, 50, 60 Gy). The algorithm was optimized according to these factors and cross-validation was performed 10 times to analyze the state of thyroid damage and select the predictors of thyroid dysfunction. The importance of the predictors identified by the three machine learning algorithms was ranked: the top five predictors were age, thyroid volume, average dose, V50 and V60. Of these, age and volume were negatively correlated with thyroid damage, indicating that the greater the age and thyroid volume, the lower the risk of thyroid damage; the average dose, V50 and V60 were positively correlated with thyroid damage, indicating that the larger the average dose, V50 and V60, the higher the risk of thyroid damage. The RF algorithm was most accurate in predicting the probability of thyroid damage among the three algorithms optimized using the above factors. The AUC was 0.827 and the ACC was 0.824. This study found that five predictors (age, thyroid volume, mean dose, V50 and V60) are important factors affecting the chance that patients with head and neck cancer who received radiation therapy will develop hypothyroidism. Using these factors as the prediction basis of the algorithm and using RF to predict the occurrence of hypothyroidism had the highest accuracy, which was 82.4%. This algorithm can be used as a reference for predicting the probability of radiation therapy complications and assisting medical decision-making in the future.