Open elray1 opened 3 months ago
Now that #837 this should be readily doable. @nikosbosse have you had any thoughts about if there is anything we can do here to reduce code duplication across nominal and ordinal predictions?
One option is just using internal functions fairly heavily and the other more complicated option is some kind of s3 class hierarchy but I am not totally sure that is worth it?
This is a request for evaluation of ordinal categorical predictions.
An example of predictions for an ordinal target can be found here. For that target, the category levels are
"low", "moderate", "high", "very high"
.To align with what's been proposed for nominal forecasts, we could have an input format as follows, where the
predicted_label
andobserved
columns are ordered factors:Setting notation, let $f(k)$ and $F(k)$ be the submitted predictive pmf and the implied predictive cdf obtained via $F(k) = \sum_{j \leq k} f(k)$, with $K$ total categories so that $k \in {1, \ldots, K}$ and the observed value $y \in {1, \ldots, K}$. Additionally, adopt the convention that $f(0) = F(0) = 0$. Some scores/metrics that it would be nice to support for ordinal forecasts include:
For both nominal and ordinal categorical forecasts, there are also all sorts of things based on summaries of confusion matrices, e.g. precision, recall, and F scores. For me personally those are less of a priority.