PlanetAlign.data
- class BaseData(graphs: list[Data], anchor_links: Tensor, name: str, train_ratio: float = 0.2, dtype: dtype = torch.float32, seed: int = 0)[source]
A dataset object storing multiple graphs and ground-truth anchor links for alignment.
- Parameters:
graphs (list[torch_geometric.data.Data]) – List of PyTorch Geometric Data objects representing the graphs.
anchor_links (torch.Tensor) – Tensor containing the anchor links between the graphs.
name (str) – Name of the dataset.
train_ratio (float, optional) – Ratio of anchor links to be used for training. Default is 0.2.
dtype (torch.dtype, optional) – Data type of the tensors, either torch.float32 or torch.float64. Default is torch.float32.
seed (int, optional) – Random seed for shuffling the anchor links. Default is 0.
- class Dataset(root: str | Path, name: str, train_ratio: float = 0.2, dtype: dtype = torch.float32, seed: int = 0)[source]
A dataset object storing multiple graphs and ground-truth anchor links for alignment.
- Parameters:
root (str or pathlib.Path) – Root directory where the dataset is stored.
name (str) – Name of the dataset.
train_ratio (float, optional) – Ratio of anchor links to be used for training. Default is 0.2.
dtype (torch.dtype, optional) – Data type of the tensors, either torch.float32 or torch.float64. Default is torch.float32.
seed (int, optional) – Random seed for shuffling the anchor links. Default is 0.