openai / ebm_code_release

Code for Implicit Generation and Generalization with Energy Based Models
https://sites.google.com/view/igebm
345 stars 66 forks source link

AUROC computation #6

Closed a7b23 closed 4 years ago

a7b23 commented 4 years ago

In section 4.4 "Out-of-Distribution Generalization" how do you compute the AUROC scores from the EBM model? The score function is un-normalized, as opposed to the likelihood which is between 0 and 1. So how is the AUROC score computed then?

yilundu commented 4 years ago

To compute AUROC, you just need to compare the relative likelihood of real and out-of-distribution samples, which you can obtain from the energy function.

yilundu commented 4 years ago

The energyevalmix function in ebm_sandbox.py shows how to compute the AUROC.

Specifically, you label real data points as 1 and fake data points as 0, and use the negative energy function as the score threshold (which does not have to be between 0 and 1)

a7b23 commented 4 years ago

Great, thanks a lot!