BoxELGDA

class mowl.models.BoxELGDA(*args, **kwargs)[source]

Bases: BoxEL

Example of BoxEL for gene-disease association prediction.

Uses default negative sampling (all classes for gci2) inherited from BoxEL.

Methods Summary

get_negative_sampling_config()

Returns the active negative sampling configuration.

Methods Documentation

get_negative_sampling_config()[source]

Returns the active negative sampling configuration.

When neg_sampling_gcis is None (the default), the configuration is derived automatically from the intersection of _DEFAULT_NEG_SAMPLING_CONFIG and the module’s neg_capable_gcis — so only GCIs that the module genuinely supports are included.

When neg_sampling_gcis is set explicitly, only those GCIs are included. Training will raise NotImplementedError if any of them are absent from neg_capable_gcis.

Override this method to customise which GCI types require negative sampling and how negatives should be generated.

Returns:

Dictionary mapping GCI names to their negative sampling config. Each entry has:

  • 'index_pool': 'classes' or 'individuals' — pool to sample from

  • 'corrupt_column': int — which column of the data tensor to replace

Return type:

dict