Recently I experimented with using ULMFiT for a text classification task. It performs extremely well, especially given the small training set. However, I don’t seem to find a way to optimize the model for Recall (or any other metric, for that matter), even though that’s what would fit my project best. Right now the model seems to be optimizing for accuracy. Changing the “metric” parameter in the “text_classifier_learner” object, but it looks like this just changes the evaluation metric that’s being reported while training, not what it calculates the cost function with. I found something called “Optim_metric” in the fastai docs, but that doesn’t show how it’s being used.
I value all input. Thanks in advance.