LPDI-EPFL / masif

MaSIF- Molecular surface interaction fingerprints. Geometric deep learning to decipher patterns in molecular surfaces.
Apache License 2.0
571 stars 151 forks source link

why (1 - auc_roc) #64

Closed raoufkeskes closed 7 months ago

raoufkeskes commented 9 months ago

Hello,

I was reading the masif_ppi_search training code train_ppi_search.py and I realized that during the training you consider 1 - AUCROC rather than simply AUCROC as the following

def compute_roc_auc(pos, neg):
    labels = np.concatenate([np.ones((len(pos))), np.zeros((len(neg)))])
    dist_pairs = np.concatenate([pos, neg])
    return metrics.roc_auc_score(labels, dist_pairs)

then,

roc_auc = 1 - compute_roc_auc(iter_pos_score, iter_neg_score)
val_auc = 1 - compute_roc_auc(pos_dists, neg_dists)
test_auc = 1 - compute_roc_auc(pos_dists, neg_dists)

so please why do you reverse the aucroc ?

YAndrewL commented 7 months ago

Hi @raoufkeskes , the same question, did you solve this?

raoufkeskes commented 7 months ago

Hello @YAndrewL

Yes I solved it !

because the ROC metric expects similarity/affinity the higher the value the better the it is
However, here we work with distances the lower the value the better the it is

computing a ROC on affinities is equivalent to compute 1 - ROC on distances

Hi @raoufkeskes , the same question, did you solve this?

YAndrewL commented 7 months ago

Hello @YAndrewL

Yes I solved it !

because the ROC metric expects similarity/affinity the higher the value the better the it is However, here we work with distances the lower the value the better the it is

computing a ROC on affinities is equivalent to compute 1 - ROC on distances

Hi @raoufkeskes , the same question, did you solve this?

Thank you so much!

raoufkeskes commented 7 months ago

you are welcome