This work is the Pytorch implementation of the loss functions that are designated for discrete ordered labels. Discrete ordered labels are labels that contain ordinal information and the distance between different classes could not be measured numerically. The detail could be found in the paper "Loss Functions for Preference Levels: Regression with Discrete Ordered Labels".
Given an N-class classification problem for discrete ordered labels, there would be N-1 thresholds represented in scalars. The goal of the loss is to encourage the model to have
There are two methods to update the threshold:
Update all the thresholds at once given a data from class i
Update neighboring thresholds at once given a data from class i
RENNIE, Jason DM; SREBRO, Nathan. Loss functions for preference levels: Regression with discrete ordered labels. In: Proceedings of the IJCAI multidisciplinary workshop on advances in preference handling. AAAI Press, Menlo Park, CA, 2005.
I am not the author of this paper.