| 英文摘要 |
Although Taiwan has a comprehensive National Health Insurance database, medical dispositions involving judicial cases require additional information from the judicial system to determine the actual status of patients after treatment. Due to the lack of integrated medico-legal databases, studies tracking post-treatment changes among offenders with mental illness such as the present research involving 74 patients are extremely rare. To address this gap, this study employs machine learning techniques to analyze and predict whether offenders with mental illness will reoffend following custodial treatment, thereby contributing to the field. Data were obtained from the forensic psychiatry database of a specialized teaching hospital. A longitudinal dataset covering 74 offenders with mental illness subjected to custodial measures between 2010 and 2020 was used, with follow-up periods ranging from 1 to 11 years. The dataset was split into 80% for training and 20% for validation. To mitigate concerns arising from limited sample size and class imbalance, the SMOTE+ENN method was applied during implementation, followed by machine learning model training. Finally, validation data were used to evaluate predictive models for recidivism using F1-score as the performance metric. Among all tested models, the Extremely Randomized Trees (ExtraTrees) Classifier achieved the highest F1-score of 0.86. This model was therefore selected as the optimal predictive tool for assessing recidivism risk among offenders with mental illness after custodial treatment. By enabling early prediction and supporting clinical decision making, this approach has the potential to reduce recidivism rates and improve the quality of psychiatric care in this domain. |