topobench.data.loaders.graph package#
Submodules#
topobench.data.loaders.graph.hetero_datasets module#
Loaders for Heterophilous Graph datasets.
- class topobench.data.loaders.graph.hetero_datasets.HeterophilousGraphDatasetLoader(parameters: DictConfig)[source]#
Bases:
AbstractLoader
Load Heterophilous Graph datasets.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
data_type: Type of the dataset (e.g., “heterophilous”)
topobench.data.loaders.graph.mantra_dataset module#
Loaders for Mantra dataset as graph.
- class topobench.data.loaders.graph.mantra_dataset.MantraSimplicialDatasetLoader(parameters: DictConfig, **kwargs)[source]#
Bases:
AbstractLoader
Load Mantra dataset with configurable parameters.
Note: for the simplicial datasets it is necessary to include DatasetLoader into the name of the class!
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
other relevant parameters
- **kwargsdict
Additional keyword arguments.
- load_dataset(**kwargs) MantraDataset [source]#
Load the Citation Hypergraph dataset.
- Parameters:
- **kwargsdict
Additional keyword arguments for dataset initialization.
- Returns:
- CitationHypergraphDataset
The loaded Citation Hypergraph dataset with the appropriate data_dir.
- Raises:
- RuntimeError
If dataset loading fails.
topobench.data.loaders.graph.manual_graph_dataset_loader module#
Loader for manually loaded graph datasets.
- class topobench.data.loaders.graph.manual_graph_dataset_loader.ManualGraphDatasetLoader(parameters: DictConfig)[source]#
Bases:
AbstractLoader
Load manually provided graph datasets.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_name: Name of the dataset
data_dir: Root directory for data
topobench.data.loaders.graph.modecule_datasets module#
Loaders for Molecule datasets (ZINC and AQSOL).
- class topobench.data.loaders.graph.modecule_datasets.MoleculeDatasetLoader(parameters: DictConfig)[source]#
Bases:
AbstractLoader
Load molecule datasets (ZINC and AQSOL) with predefined splits.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
data_type: Type of the dataset (e.g., “molecule”)
topobench.data.loaders.graph.ogbg_datasets module#
Loaders for Graph Property Prediction datasets.
- class topobench.data.loaders.graph.ogbg_datasets.OGBGDatasetLoader(parameters: DictConfig)[source]#
Bases:
AbstractLoader
Load molecule datasets (molhiv, molpcba, ppa) with predefined splits.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
data_type: Type of the dataset (e.g., “molecule”)
topobench.data.loaders.graph.planetoid_datasets module#
Loaders for PLANETOID datasets.
- class topobench.data.loaders.graph.planetoid_datasets.PlanetoidDatasetLoader(parameters: DictConfig)[source]#
Bases:
AbstractLoader
Load PLANETOID datasets.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
data_type: Type of the dataset (e.g., “cocitation”)
topobench.data.loaders.graph.tu_datasets module#
Loaders for TU datasets.
- class topobench.data.loaders.graph.tu_datasets.TUDatasetLoader(parameters: DictConfig)[source]#
Bases:
AbstractLoader
Load TU datasets.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
data_type: Type of the dataset (e.g., “graph_classification”)
topobench.data.loaders.graph.us_county_demos_dataset_loader module#
Loaders for US County Demos dataset.
- class topobench.data.loaders.graph.us_county_demos_dataset_loader.USCountyDemosDatasetLoader(parameters: DictConfig)[source]#
Bases:
AbstractLoader
Load US County Demos dataset with configurable year and task variable.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
year: Year of the dataset (if applicable)
task_variable: Task variable for the dataset
- load_dataset() USCountyDemosDataset [source]#
Load the US County Demos dataset.
- Returns:
- USCountyDemosDataset
The loaded US County Demos dataset with the appropriate data_dir.
- Raises:
- RuntimeError
If dataset loading fails.
Module contents#
Init file for graph load module with automated loader discovery.
- class topobench.data.loaders.graph.HeterophilousGraphDatasetLoader(parameters: DictConfig)#
Bases:
AbstractLoader
Load Heterophilous Graph datasets.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
data_type: Type of the dataset (e.g., “heterophilous”)
- load_dataset() Dataset #
Load Heterophilous Graph dataset.
- Returns:
- Dataset
The loaded Heterophilous Graph dataset.
- Raises:
- RuntimeError
If dataset loading fails.
- class topobench.data.loaders.graph.MantraSimplicialDatasetLoader(parameters: DictConfig, **kwargs)#
Bases:
AbstractLoader
Load Mantra dataset with configurable parameters.
Note: for the simplicial datasets it is necessary to include DatasetLoader into the name of the class!
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
other relevant parameters
- **kwargsdict
Additional keyword arguments.
- load_dataset(**kwargs) MantraDataset #
Load the Citation Hypergraph dataset.
- Parameters:
- **kwargsdict
Additional keyword arguments for dataset initialization.
- Returns:
- CitationHypergraphDataset
The loaded Citation Hypergraph dataset with the appropriate data_dir.
- Raises:
- RuntimeError
If dataset loading fails.
- class topobench.data.loaders.graph.ManualGraphDatasetLoader(parameters: DictConfig)#
Bases:
AbstractLoader
Load manually provided graph datasets.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_name: Name of the dataset
data_dir: Root directory for data
- class topobench.data.loaders.graph.MoleculeDatasetLoader(parameters: DictConfig)#
Bases:
AbstractLoader
Load molecule datasets (ZINC and AQSOL) with predefined splits.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
data_type: Type of the dataset (e.g., “molecule”)
- load_dataset() Dataset #
Load the molecule dataset with predefined splits.
- Returns:
- Dataset
The combined dataset with predefined splits.
- Raises:
- RuntimeError
If dataset loading fails.
- class topobench.data.loaders.graph.OGBGDatasetLoader(parameters: DictConfig)#
Bases:
AbstractLoader
Load molecule datasets (molhiv, molpcba, ppa) with predefined splits.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
data_type: Type of the dataset (e.g., “molecule”)
- load_dataset() Dataset #
Load the molecule dataset with predefined splits.
- Returns:
- Dataset
The combined dataset with predefined splits.
- Raises:
- RuntimeError
If dataset loading fails.
- class topobench.data.loaders.graph.PlanetoidDatasetLoader(parameters: DictConfig)#
Bases:
AbstractLoader
Load PLANETOID datasets.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
data_type: Type of the dataset (e.g., “cocitation”)
- load_dataset() Dataset #
Load Planetoid dataset.
- Returns:
- Dataset
The loaded Planetoid dataset.
- Raises:
- RuntimeError
If dataset loading fails.
- class topobench.data.loaders.graph.TUDatasetLoader(parameters: DictConfig)#
Bases:
AbstractLoader
Load TU datasets.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
data_type: Type of the dataset (e.g., “graph_classification”)
- load_dataset() Dataset #
Load TU dataset.
- Returns:
- Dataset
The loaded TU dataset.
- Raises:
- RuntimeError
If dataset loading fails.
- class topobench.data.loaders.graph.USCountyDemosDatasetLoader(parameters: DictConfig)#
Bases:
AbstractLoader
Load US County Demos dataset with configurable year and task variable.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
year: Year of the dataset (if applicable)
task_variable: Task variable for the dataset
- load_dataset() USCountyDemosDataset #
Load the US County Demos dataset.
- Returns:
- USCountyDemosDataset
The loaded US County Demos dataset with the appropriate data_dir.
- Raises:
- RuntimeError
If dataset loading fails.