79731821

Date: 2025-08-11 08:26:23
Score: 1
Natty:
Report link

I'm relatively new to this stuff, but I think it's impossible, for mathematical reasons. I'll try to explain below.

Any training metric must be differentiable with respect to the model parameters, so that the training process is able to optimise with respect to that metric, and find a local minimum / maxmimum.

The F1 score is defined as a function of precision and recall. These are both integer-valued 'counts' of the number of values in two blocks of the confusion matrix, and are therefore not differentiable with respect to model parameters.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: AGibbs