scglue.models.data.GraphDataset
- class scglue.models.data.GraphDataset(graph, vertices, neg_samples=1, weighted_sampling=True, deemphasize_loops=True, getitem_size=1)[source]
Bases:
DatasetDataset for graphs with support for negative sampling
- Parameters:
graph (
Graph) – Graph objectvertices (
pandas.core.indexes.base.Index) – Indexer of graph verticesneg_samples (
int) – Number of negative samples per edgeweighted_sampling (
bool) – Whether to do negative sampling based on vertex importancedeemphasize_loops (
bool) – Whether to deemphasize self-loops when computing vertex importancegetitem_size (
int) – Unitary fetch size for each __getitem__ call
Note
Custom shuffling performs negative sampling.
Methods
Accept shuffling result
Convert graph object to graph triplet
Propose shuffling using a given random seed
Attributes
logger