Source code for mowl.models.elbe.examples.model_gda
from mowl.models import ELBE
[docs]
class ELBEGDA(ELBE):
"""
Example of ELBE for gene-disease associations prediction.
Uses default negative sampling (all classes for gci2) and MSE loss
inherited from ELBE.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.eval_gci_name = "gci2"
[docs]
def get_negative_sampling_config(self):
"""Only do negative sampling for gci2."""
return {
"gci2": {"index_pool": "classes", "corrupt_column": 2}
}