Ordinal classification is a machine learning framework where classes are ordered. Its ubiquity across different fields and its conceptual differences from regression and nominal classification necessitate the development of methods to implement this framework. The current study explores the Earth-Mover Distance (EMD) loss function, which imposes heavier penalties on far predictions. It is compared to the cross-entropy (CE) loss function, which is more commonly used in nominal classification problems. The dataset concerns the relationship between eucalyptus species and their effects on soil conservation. The target variable of the dataset has five classes (soil utilities). After applying scaling and train-test split, a neural network with two hidden layers and a rectified linear unit activation function was trained for 100 epochs to predict the target variables, and evaluated using accuracy and mean absolute error (MAE). Three loss functions were used: CE, EMD, and a hybrid loss function that returns a weighted loss of CE and EMD. Results show that accuracies and MAEs are similar across loss functions. This little improvement may stem from the CE confusion matrix already having few far predictions. This study recommends using the confusion matrix as a diagnostic tool before applying EMD and comparing the results associated with different weights in the hybrid loss function.
- PDF: Research paper
- Notebook: Codes for the data preprocessing, neural network, and evaluation
eucalyptus.arff: Dataset used in the study