Closed layadas closed 8 months ago
Hi.
You're right. Apparently this got hard-coded at some point. After a quick check, it seems that the datasets still support a custom nominal label, but the trainer and losses don't. We need to pass the nominal label to the trainer here, here, here, and here. Then, the trainer needs to pass the nominal label definition to the loss invocations at all relevant places. For example, the losses are called here, here, here, here, and here. Then, we need to redefine the loss function to process the nominal label and invert the scores for the AuROC computation. In conclusion, it's perhaps easier to just swap the labels of your dataset. ;)
Btw, there is an updated version of the HSC paper published in TMLR: https://arxiv.org/pdf/2205.11474.pdf.
Hope it helps!
Thank you for your suggestion. It does appear easier to switch the labels. Thank you for the link to the paper.
I am trying to understand how I can edit the code so that I can safely use an anomalous label of
0
as is done in the HSC paper. I went into the loss function definitions in the FCDD trainer and it looks like the loss is hard-coded to consider0
as nominal and1
as anomalous. I want to rewrite the loss function so that0
is anomalous and1
is nominal. How can I achieve this?