In hospitals, the deterioration of a patient's condition leading to death is often preceded by physiological abnormalities in the hours to days beforehand. Several risk-scoring systems have been developed to identify patients at risk of major adverse events; however, such systems often exhibit low sensitivity and specificity. To identify the risk factors associated with in-hospital cardiac arrest (IHCA), we conducted a retrospective cohort study at a tertiary medical center in Taiwan. Four machine learning algorithms were employed to identify the factors most predictive of IHCA. The support vector machine model was discovered to be the most effective at predicting IHCA. The ten most critical physiological parameters at 8 h prior to the event were pulse rate, age, white blood cell count, lymphocyte count, body temperature, body mass index, systolic and diastolic blood pressure, platelet count, and use of central nervous system-active medication. Using these parameters, we can enhance early warning and rapid response systems in our hospital, potentially reducing the incidence of IHCA in clinical practice.