gammagl.data.Dataset¶
- class Dataset(root: str | None = None, transform: Callable | None = None, pre_transform: Callable | None = None, pre_filter: Callable | None = None, force_reload: bool = False)[source]¶
Bases:
Dataset
Dataset base class for creating graph datasets. See here for the accompanying tutorial.
- Parameters:
root (str, optional) – Root directory where the dataset should be saved. (optional:
None
)transform (callable, optional) – A function/transform that takes in an
gammagl.data.Graph
object and returns a transformed version. The data object will be transformed before every access. (default:None
)pre_transform (callable, optional) – A function/transform that takes in an
gammagl.data.Graph
object and returns a transformed version. The graph object will be transformed before being saved to disk. (default:None
)pre_filter (callable, optional) – A function that takes in an
gammagl.data.Graph
object and returns a boolean value, indicating whether the graph object should be included in the final dataset. (default:None
)force_reload (bool, optional) – Whether to re-process the dataset.(default:
False
)
- property raw_file_names: str | List[str] | Tuple¶
The name of the files in the
self.raw_dir
folder that must be present in order to skip downloading.
- property processed_file_names: str | List[str] | Tuple¶
The name of the files in the
self.processed_dir
folder that must be present in order to skip processing.
- property num_features: int¶
Returns the number of features per node in the dataset. Alias for
num_node_features
.
- property raw_paths: List[str]¶
The absolute filepaths that must be present in order to skip downloading.
- property processed_paths: List[str]¶
The absolute filepaths that must be present in order to skip processing.