This study aims to evaluate the effectiveness of the laboratory-made catalyst Ni2P-ZrO2 (NPZ) in the degradation of an antibiotic in an aqueous suspension when exposed to ultraviolet (UV) light. The degradation of amoxicillin (AMX) was predicted using time series forecasting through the ensemble gradient boosting model. The degradation experiments were conducted utilizing two distinct photocatalyst compositions of Nickel phosphide-zirconium dioxide (NPZ) in the proportions of 1:9 and 2:8. The most effective experimental results were obtained using a natural pH, a catalyst concentration of 0.20 g/L and reaction duration of 0.5 h after testing the different catalysts. Experimental data were used for training, validating and confirming time series predictions. The use of ensemble technique highly affected the experimental findings. The model's performance was quite satisfactory in terms of correlation coefficient (94.00%), normalized mean square error (0.01) and mean square root error (0.0911) which significantly contributed to the model's accuracy. All input variables, such as pH, catalyst dose and irradiation time, had a significant impact on the degrading efficacy. The study has demonstrated that time series forecasting can be used for predicting the degradation process precisely.