|
| 1 | +from typing import List |
| 2 | +from torchhd.datasets import DatasetTrainTest |
| 3 | + |
| 4 | + |
| 5 | +class AudiologyStd(DatasetTrainTest): |
| 6 | + """`Audiology (Standardized) <https://archive.ics.uci.edu/ml/datasets/Audiology+%28Standardized%29>`_ dataset. |
| 7 | +
|
| 8 | + Args: |
| 9 | + root (string): Root directory containing the files of the dataset. |
| 10 | + train (bool, optional): If True, returns training (sub)set from the file storing training data as further determined by hyper_search variable. |
| 11 | + Otherwise returns a subset of train dataset if hyperparameter search is performed (``hyper_search = True``) if not (``hyper_search = False``) returns test set. |
| 12 | + hyper_search (bool, optional): If True, creates dataset using indices in ``conxuntos.dat``. This split is used for hyperparameter search. The first row corresponds to train indices (used if ``train = True``) |
| 13 | + while the second row corresponds to test indices (used if ``train = False``). |
| 14 | + transform (callable, optional): A function/transform that takes in an torch.FloatTensor |
| 15 | + and returns a transformed version. |
| 16 | + target_transform (callable, optional): A function/transform that takes in the |
| 17 | + target and transforms it. |
| 18 | + download (bool, optional): If True, downloads the dataset from the internet and |
| 19 | + puts it in root directory. If dataset is already downloaded, it is not |
| 20 | + downloaded again. |
| 21 | + """ |
| 22 | + |
| 23 | + name = "audiology-std" |
| 24 | + classes: List[str] = [ |
| 25 | + "cochlear_age", |
| 26 | + "cochlear_age_and_noise", |
| 27 | + "cochlear_noise_and_heredity", |
| 28 | + "cochlear_poss_noise", |
| 29 | + "cochlear_unknown", |
| 30 | + "conductive_discontinuity", |
| 31 | + "conductive_fixation", |
| 32 | + "mixed_cochlear_age_otitis_media", |
| 33 | + "mixed_cochlear_age_s_om", |
| 34 | + "mixed_cochlear_unk_discontinuity", |
| 35 | + "mixed_cochlear_unk_fixation", |
| 36 | + "mixed_cochlear_unk_ser_om", |
| 37 | + "mixed_poss_noise_om", |
| 38 | + "normal_ear", |
| 39 | + "otitis_media", |
| 40 | + "possible_brainstem_disorder", |
| 41 | + "possible_menieres", |
| 42 | + "retrocochlear_unknown", |
| 43 | + ] |
0 commit comments