lukasruff / Deep-SVDD-PyTorch

A PyTorch implementation of the Deep SVDD anomaly detection method
MIT License
698 stars 197 forks source link

How to map scores to predicted labels to compute F1 score with one-class objective #39

Open alishan2040 opened 1 year ago

alishan2040 commented 1 year ago

Hi @lukasruff ,

Could you please explain how can I map the predicted scores into predicted labels to compute precision, recall and f1 score. Line 147 from src/optim/deepSVDD_trainer.py _, labels, scores = zip(*idx_label_score) For soft-boundary, I found in the paper that +ve values are considered as outliers while negative values (< 0) are treated are normal (inliers). Does this apply to the one-class objective as well? Thanks,

szgy66 commented 2 weeks ago

Hi @lukasruff ,

Could you please explain how can I map the predicted scores into predicted labels to compute precision, recall and f1 score. Line 147 from src/optim/deepSVDD_trainer.py _, labels, scores = zip(*idx_label_score) For soft-boundary, I found in the paper that +ve values are considered as outliers while negative values (< 0) are treated are normal (inliers). Does this apply to the one-class objective as well? Thanks,

I also want to know, had you solved it?