This study investigated the effectiveness of hydroxyl radical-based photochemical oxidation processes on metformin (METF) removal, and the experimental data were modeled by machine learning (ML) algorithms. Hydrogen peroxide (HP), sodium percarbonate (PC), and peracetic acid (PAA) were used as hydroxyl radicals sources. Modeling was conducted using ML algorithms with the integration of additional experiments. Under optimum conditions (UV/PC: pH 5, PC 6 mM, UV/HP: pH 3, HP 6 mM, UV/PAA: pH 9, PAA 6 mM), the METF removal efficiency was 74.1 %, 40.7 %, and 47.9 % with UV/PC, UV/HP, and UV/PAA, respectively. The scavenging experiments revealed that hydroxyl and singlet oxygen radicals were dominant in UV/PC and hydroxyl radicals were predominant in UV/HP and UV/PAA. Nitrate negatively affected UV/HP, UV/PC, and UV/PAA, whereas chlorine had a positive impact. The EE/O were 0.682, 1.75, and 1.41 kWh/L for UV/PC, UV/HP, and UV/PAA, respectively. The experimental results were successfully modeled by ML models with high R