|
| 1 | +from typing import List |
| 2 | +from torchhd.datasets import DatasetFourFold |
| 3 | + |
| 4 | + |
| 5 | +class IlpdIndianLiver(DatasetFourFold): |
| 6 | + """`ILPD (Indian Liver Patient Dataset) <https://archive.ics.uci.edu/ml/datasets/ILPD+(Indian+Liver+Patient+Dataset)>`_ 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 fold and hyper_search variables. |
| 11 | + Otherwise returns a subset of train dataset if hypersearch is performed (``hyper_search = True``) if not (``hyper_search = False``) returns a subset of training dataset |
| 12 | + as specified in ``conxuntos_kfold.dat`` if fold number is correct. Otherwise issues an error. |
| 13 | + fold (int, optional): Specifies which fold number to use. The default value of -1 returns all the training data from the corresponding file. |
| 14 | + Values between 0 and 3 specify, which fold in ``conxuntos_kfold.dat`` to use. Relevant only if hyper_search is set to False and ``0 <= fold <= 3``. |
| 15 | + Indices in even rows (zero indexing) of ``conxuntos_kfold.dat`` correspond to train subsets while indices in odd rows correspond to test subsets. |
| 16 | + hyper_search (bool, optional): If True, creates dataset using indeces in ``conxuntos.dat``. This split is used for hyperparameter search. The first row corresponds to train indices (used if ``train = True``) |
| 17 | + while the second row corresponds to test indices (used if ``train = False``). |
| 18 | + transform (callable, optional): A function/transform that takes in an torch.FloatTensor |
| 19 | + and returns a transformed version. |
| 20 | + target_transform (callable, optional): A function/transform that takes in the |
| 21 | + target and transforms it. |
| 22 | + download (bool, optional): If True, downloads the dataset from the internet and |
| 23 | + puts it in root directory. If dataset is already downloaded, it is not |
| 24 | + downloaded again. |
| 25 | + """ |
| 26 | + |
| 27 | + name = "ilpd-indian-liver" |
| 28 | + classes: List[str] = [ |
| 29 | + "liver patient", |
| 30 | + "not liver patient", |
| 31 | + ] |
0 commit comments