commonpower.data_forecasting.nn_forecasting.data_splitting.DatasetSplit
- class DatasetSplit(split_type: DataSplitType, data_source: DataSource, model: NNModule)[source]
Bases:
objectDataSplits are used to split the dataset into training, validation, and test sets. They do that by adjusting the index when accessing the dataset.
- Parameters:
split_type (DataSplitType) – The type of data splitting.
data_source (DataSource) – The data source.
model (NNModule) – The neural network model.
- Returns:
DatasetSplit – The initialized DatasetSplit object.
Methods
Adjusts the index to the correct position in the dataset.