Deep learning techniques for ordinal classification have recently gained significant attention. Predicting an ordinal variable, that is, a variable that demonstrates a natural relationship between categories, is of relevance for a number of real-world problems in various fields of knowledge. For example, a medical diagnosis can occur at different stages of the disease. Applying standard classifiers to ordered labels can lead to errors in distant categories, when errors in an ordinal problem ideally tend to be produced in adjacent classes because of their similarity. To address this issue, we propose a soft labelling approach based on generalised triangular distributions, which are asymmetric and different for each class. The parameters of these distributions are determined using a metaheuristic and are specifically adapted to the given problem. Moreover, this approach enables the model to avoid errors in distant classes (e.g. classifying a patient with a severe disease as healthy). A comprehensive comparison was performed using eight datasets and five performance metrics. The main advantage of the proposed soft-labelling approach is that it adapts the distributions to each problem, resulting in greater flexibility and better performance. The results and statistical analysis show that the proposed methodology significantly outperforms all other methods.