Open shounakpaul95 opened 3 years ago
We (not affiliated with AllenNLP) are actually working on exactly that! Our implementation subclasses FBetaMeasure
and has (almost) all the same unit tests. Still stuck on a couple.
You can take a look at it here where we also have a multi-label dataset reader and a multi-label text classification model. The metric specifically is here.
If the AllenNLP devs think this is something that should be added to allennlp
or allennlp-models
I would be happy to work on a PR.
I have made my custom function for calculating Precision, Recall, and F1-Score for the multi-label classification. It's a generic function that can be used with any algo or framework you are using for multilabel classification.
@JohnGiorgi, we'd be excited to have this in the core library. I'm happy to review a PR or two :-)
Thanks @JohnGiorgi This works.
Is there any built-in functionality to calculate metrics like Precision, Recall and F1-Score for the multi-label multi-class classification scenario (one or more target classes)?
The current implementation of FBeta Measure can only take inputs for the single-label scenario.