chmncc.dataset package
Submodules
chmncc.dataset.dataloaders module
chmncc.dataset.datasets module
Original datasets metadata: Giunchiglia et al approach
chmncc.dataset.load_cifar module
chmncc.dataset.load_dataset module
chmncc.dataset.load_dataset_factory module
chmncc.dataset.load_debug_dataset module
chmncc.dataset.load_fashion_mnist module
chmncc.dataset.load_mnist module
chmncc.dataset.load_omniglot module
chmncc.dataset.parser module
Original parser This code was adapted from https://github.com/lucamasera/AWX
- class chmncc.dataset.parser.arff_data(arff_file, is_GO, is_test=False)[source]
Bases:
object
All the datasets they provide are in arff, this is the class
- chmncc.dataset.parser.initialize_dataset(name: str, datasets: Dict[str, Tuple[bool, str, str, str]]) Tuple[arff_data, arff_data, arff_data] [source]
Initialize the dataset
- Parameters:
[str] (name) – name of the dataset to prepare
Dict[List[bool (datasets) – whether the dataset is GO, the train,
str – whether the dataset is GO, the train,
str – whether the dataset is GO, the train,
str]] – whether the dataset is GO, the train,
location (validation and test data) –
- Returns:
train dataset [arff_data] validation dataset [arff_data] test dataset [arff_data]
- chmncc.dataset.parser.initialize_other_dataset(name: str, datasets: Dict[str, Tuple[bool, str, str]]) Tuple[arff_data, arff_data] [source]
Initialize the dataset
- Parameters:
[str] (name) – name of the dataset to prepare
[bool (datasets) – whether the dataset is go (?), the train
str – whether the dataset is go (?), the train
str] – whether the dataset is go (?), the train
location (and test data) –
- Returns:
train dataset [arff_data] test dataset [arff_data]
- chmncc.dataset.parser.parse_arff(arff_file: str, is_GO=False, is_test=False) Tuple[Tensor, Tensor, Tensor, DiGraph] [source]
Parse the arff data
- Parameters:
[str] (arf_file) – arff file
[bool] (is_test) – whether it is the GO dataset
[bool] – whether the dataset is test
- Returns:
X [torch.Tensor] data instances Y [torch.Tensor] labels R [torch.Tensor[torch.Tensor]] adjacency matrix g [nx.DiGraph] graph