![]() |
Belle II Software development
|
Public Member Functions | |
__init__ (self, root, n_files=None, samples=None, features=[], edge_features=[], global_features=[], normalize=None, **kwargs) | |
processed_file_names (self) | |
process (self) | |
Public Attributes | |
root = Path(root) | |
Root path. | |
normalize = normalize | |
Normalize. | |
n_files = n_files | |
Number of files. | |
node_features = features | |
Node features. | |
edge_features = edge_features | |
Edge features. | |
global_features = global_features | |
Global features. | |
samples = samples | |
Samples. | |
data = True) | |
Data and Slices. | |
slices = torch.load(self.processed_paths[0]) | |
Data and Slices. | |
x | |
delete attributes | |
y | |
delete attributes | |
avail_samples | |
delete attributes | |
Dataset handler for converting Belle II data to PyTorch geometric InMemoryDataset. The ROOT format expects the tree in every file to be named ``Tree``, and all node features to have the format ``feat_FEATNAME``. .. note:: This expects the files under root to have the structure ``root/**/<file_name>.root`` where the root path is different for train and val. The ``**/`` is to handle subdirectories, e.g. ``sub00``. Args: root (str): Path to ROOT files. n_files (int): Load only ``n_files`` files. samples (int): Load only ``samples`` events. features (list): List of node features names. edge_features (list): List of edge features names. global_features (list): List of global features names. normalize (bool): Whether to normalize input features.
Definition at line 258 of file geometric_datasets.py.
__init__ | ( | self, | |
root, | |||
n_files = None, | |||
samples = None, | |||
features = [], | |||
edge_features = [], | |||
global_features = [], | |||
normalize = None, | |||
** | kwargs ) |
Initialization.
Definition at line 279 of file geometric_datasets.py.
process | ( | self | ) |
Processes the data to create graph objects and stores them in ``root/processed/processed_data.pt`` where the root path is different for train and val. Called internally by PyTorch.
Definition at line 334 of file geometric_datasets.py.
processed_file_names | ( | self | ) |
Name of processed file.
Definition at line 328 of file geometric_datasets.py.
avail_samples |
delete attributes
Definition at line 347 of file geometric_datasets.py.
data = True) |
Data and Slices.
Definition at line 325 of file geometric_datasets.py.
edge_features = edge_features |
Edge features.
Definition at line 309 of file geometric_datasets.py.
global_features = global_features |
Global features.
Definition at line 311 of file geometric_datasets.py.
n_files = n_files |
Number of files.
Definition at line 305 of file geometric_datasets.py.
node_features = features |
Node features.
Definition at line 307 of file geometric_datasets.py.
normalize = normalize |
Normalize.
Definition at line 302 of file geometric_datasets.py.
root = Path(root) |
Root path.
Definition at line 299 of file geometric_datasets.py.
samples = samples |
Samples.
Definition at line 313 of file geometric_datasets.py.
slices = torch.load(self.processed_paths[0]) |
Data and Slices.
Definition at line 325 of file geometric_datasets.py.
x |
delete attributes
Definition at line 347 of file geometric_datasets.py.
y |
delete attributes
Definition at line 347 of file geometric_datasets.py.