In this paper, we propose an improved version of Twin SVM using a non-smooth optimization method. Twin SVM generally consists in determining two non-parallel planes by alternately solving two constrained optimization models. Solving this problem using the classical Lagrangian method has many limitations, notably: its only limited to handle Gaussian noise, generally exaggerates the influence of outliers and cannot handle unbalanced data, this due to the differentiability of the model. To circumvent these issues, we transform two-constraint optimization models using the penalty method into an unconstrained non-smooth optimization one. The non-smoothness nature of the problem has many advantages, but it requires special treatment, which is why we use the primal dual method to solve it, since it is the most appropriate and it is robust in terms of stability, convergence and speed (Lyaqini, Nachaoui and Hadri, 2022). To demonstrate the effectiveness of the proposed approach, several experiments were carried out on numerous UCI benchmarks, medical image and HandPD datasets. These experiments demonstrated the effectiveness and applicability of the proposed approach, with satisfactory results compared to the state of the art.