[Metrics] help with the use of AUROC for multi-label classification #7327
Unanswered
hkmztrk
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment
-
@hkmztrk According to the source code,
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all,
I am using
pytorch-lightning==1.2.7
and I need a little bit guidance on using PL metrics. I was previously using sklearn metrics, but they seemed to be problematic because of numpy arrays, so I decided to switch PL metrics. Below is my current implementation. I only want to compute the metrics at epoch ends and I am using self.log to monitor the metrics but I am also using logging to print out the results at epoch ends.According to the documentation:
My question is whether my calling compute() function below means that I need to reset() them right after. I'd appreciate a lot if you can help me with this.
Another question is that since I'm doing multi-label classification (binary classification for n labels),
e.g. [0, 1, 0, 0, 1]
, should I update initialisation as below (i.e. including pos_label tag)?self.valid_auroc = pl.metrics.AUROC(num_classes=n_labels, pos_label=1)
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions