pubmed
Bases: graph_dataloader
A dataloader class for the PubMed dataset.
This class extends graph_dataloader
to handle the PubMed graph dataset,
a large-scale dataset used for graph-based learning.
Attributes:
Name | Type | Description |
---|---|---|
data_profile |
dict
|
Metadata and download links specific to the PubMed dataset. |
graph |
graph
|
The loaded graph structure for the PubMed dataset. |
Methods:
Name | Description |
---|---|
__init__ |
Initializes the dataloader for the PubMed dataset. |
get_train_test_idx |
Generates train and test indices for the PubMed dataset. |
Source code in tinybig/data/graph_dataloader.py
__init__(name='pubmed', train_batch_size=64, test_batch_size=64, *args, **kwargs)
Initializes the dataloader for the PubMed dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the dataset. |
'pubmed'
|
train_batch_size
|
int
|
Batch size for the training dataset. |
64
|
test_batch_size
|
int
|
Batch size for the testing dataset. |
64
|
Returns:
Type | Description |
---|---|
None
|
|
Source code in tinybig/data/graph_dataloader.py
get_train_test_idx(X=None, y=None, *args, **kwargs)
Generates train and test indices for the PubMed dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X
|
Tensor
|
Node features (not used in this method). |
None
|
y
|
Tensor
|
Labels (not used in this method). |
None
|
Returns:
Type | Description |
---|---|
tuple
|
Train indices ( |
Notes
The train indices are predefined as the first 60 nodes. The test indices are predefined as nodes 6300 to 7299.