Wastewater from the Antibiotical-Saidal pharmaceutical plant (Medéa) was pretreated by coagulation-flocculation using copper sulfate (CuSO4), iron chloride (FeCl3), and mixture of the two salts combined in a 1:1 (v/v) ratio in the present study. Response surface methodology (RSM) was used to optimize pH and coagulant dosage as independent variables, while dissolved organic carbon (DOC), absorbance at 254 nm (UV 254), and turbidity were provided as dependent variables in the central composite design (CCD). Then, the databases of the three treatments were combined in a single database to create a general model valid for the three treatments at the same time, and to predict the reduction rates of DOC, UV254, and turbidity, using the Gaussian process regression coupled with the dragonfly optimization algorithm (GPR-DA). To have the best model obtained between RMS and GPR-DA, an experimental validation was carried out after having had the optimal conditions of each type of coagulant, using the multi-objective optimization technique. The results of the experimental validation show the superiority of the GPR-DA model compared to the RSM model. Also, the results show that the mixed coagulant (CuSO4 + FeCl3) obtain better results than CuSO4 or FeCl3 alone with a treatment efficiency equal to 92.68% at pH = 5 and dosage = 600 mg/L, and the reductions in DOC, UV 254 and turbidity are 97.32%, 82.90% and 96.47%, respectively.