dataset.py - cmikke97/Automatic-Malware-Signature-Generation GitHub Wiki

In this page

Imported Modules



Back to top

Classes and functions

Dataset (class) - Pre-processed dataset class.

  • __init__(self, ds_root, mode, n_samples, return_malicious, return_counts, return_tags, return_shas) (member function) - Initialize Dataset class.
    • ds_root (arg) - Pre-processed dataset root directory (where to find .dat files)
    • mode (arg) - Mode of use of the dataset object (it may be 'train', 'validation' or 'test') (default: 'train')
    • n_samples (arg) - Number of samples to consider (used just to access the right pre-processed files) (default: None)
    • return_malicious (arg) - Whether to return the malicious label for the data point or not (default: True)
    • return_counts (arg) - Whether to return the counts for the data point or not (default: True)
    • return_tags (arg) - Whether to return the tags for the data points or not (default: True)
    • return_shas (arg) - Whether to return the sha256 of the data points or not (default: False)
  • __len__(self) *(member function) - Get dataset total length.
  • __getitem__(self, index) (member function) - Get item from dataset.
    • index (arg) - Index of the item to get

Back to top

⚠️ **GitHub.com Fallback** ⚠️