torchsig.datasets.narrowband.StaticNarrowband¶
- class torchsig.datasets.narrowband.StaticNarrowband(root: str, impairment_level: int, transforms: list = [], target_transforms: list = [], file_handler_class: ~torchsig.utils.file_handlers.base_handler.TorchSigFileHandler = <class 'torchsig.utils.file_handlers.zarr.ZarrFileHandler'>, train: bool | None = None, **kwargs)[source]¶
Bases:
StaticTorchSigDatasetLoads and provides access to a pre-generated Narrowband dataset.
This class allows for loading a narrowband dataset stored on disk, with the ability to apply transformations to the data and target labels. The dataset can be accessed in raw or impaired form.
- Parameters:
root (str) – The root directory where the dataset is stored.
impairment_level (int) – Defines impairment level 0, 1, 2.
transforms (list, optional) – A transformation to apply to the data. Defaults to [].
target_transforms (list, optional) – A transformation to apply to the targets. Defaults to [].
file_handler_class (TorchSigFileHandler, optional) – The file handler class for reading the dataset. Defaults to ZarrFileHandler.
**kwargs – Additional keyword arguments passed to the parent class (StaticTorchSigDataset).
Methods
- __init__(root: str, impairment_level: int, transforms: list = [], target_transforms: list = [], file_handler_class: ~torchsig.utils.file_handlers.base_handler.TorchSigFileHandler = <class 'torchsig.utils.file_handlers.zarr.ZarrFileHandler'>, train: bool | None = None, **kwargs)[source]¶
Initializes the StaticNarrowband dataset.
- Parameters:
root (str) – The root directory where the dataset is stored.
impairment_level (int) – Defines impairment level 0, 1, 2.
transforms (list, optional) – Transforms to apply to the data.
target_transforms (list, optional) – Target Transforms to apply.
file_handler_class (TorchSigFileHandler, optional) – The file handler class for reading the dataset.
**kwargs – Additional arguments passed to the parent class initialization.