autora.theorist.darts.dataset
DARTSDataset
Bases: Dataset
A dataset for the DARTS algorithm.
Source code in temp_dir/darts/src/autora/theorist/darts/dataset.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
__getitem__(idx)
Returns the item at the given index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
idx
|
int
|
The index of the item to return. |
required |
Returns:
Type | Description |
---|---|
Tuple[tensor, tensor]
|
The item at the given index. |
Source code in temp_dir/darts/src/autora/theorist/darts/dataset.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
__init__(input_data, output_data)
Initializes the dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_data
|
tensor
|
The input data to the dataset. |
required |
output_data
|
tensor
|
The output data to the dataset. |
required |
Source code in temp_dir/darts/src/autora/theorist/darts/dataset.py
13 14 15 16 17 18 19 20 21 22 23 |
|
__len__(experiment_id=None)
Returns the length of the dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
experiment_id
|
Optional[int]
|
|
None
|
Returns:
Type | Description |
---|---|
int
|
The length of the dataset. |
Source code in temp_dir/darts/src/autora/theorist/darts/dataset.py
25 26 27 28 29 30 31 32 33 34 35 |
|
darts_dataset_from_ndarray(input_data, output_data)
A function to create a dataset from numpy arrays.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_data
|
ndarray
|
The input data to the dataset. |
required |
output_data
|
ndarray
|
The output data to the dataset. |
required |
Returns:
Type | Description |
---|---|
DARTSDataset
|
The dataset. |
Source code in temp_dir/darts/src/autora/theorist/darts/dataset.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|