model.dataloader
SEQUENCE_DATASET Objects
class SEQUENCE_DATASET(Dataset)
__init__
def __init__(path_to_file: str, data: str, train: bool, temporal_window: int,
**kwargs) -> None
Initialize the Sequence Dataset. Creates files at:
- project_name/
- data/
- train/
- seq_mean.npy
- seq_std.npy
- train/
Parameters
- path_to_file (
str
): Path to the dataset files. - data (
str
): Name of the data file. - train (
bool
): Flag indicating whether it's training data. - temporal_window (
int
): Size of the temporal window.
Returns
None
__len__
def __len__() -> int
Return the number of data points.
Returns
int
: Number of data points.
__getitem__
def __getitem__(index: int) -> torch.Tensor
Get a normalized sequence at the specified index.
Parameters
- index (
int
): Index of the item.
Returns
torch.Tensor
: Normalized sequence data at the specified index.