citylearn.end_use_load_profiles.lstm_model.preprocessing module
- citylearn.end_use_load_profiles.lstm_model.preprocessing.dataset_dataloader(x: ndarray, y: ndarray, batch_size: int, shuffle: bool = None, drop_last: bool = None) Tuple[TensorDataset, DataLoader][source]
- citylearn.end_use_load_profiles.lstm_model.preprocessing.preprocess_df(config: Mapping[str, Any], df: DataFrame, train_references: List[int] = None, validation_references: List[int] = None, test_references: List[int] = None) Mapping[str, Any][source]
- citylearn.end_use_load_profiles.lstm_model.preprocessing.sliding_windows(data: ndarray, seq_length: int, output_len: int)[source]
Create sliding window input/output arrays.
The target variable is expected to be the last column in
data.- Parameters:
data – Input array.
seq_length – Number of lookback time steps.
output_len – Number of time steps ahead to predict.
- Returns:
Tuple
(x, y)wherexhas shape[num_steps - seq_length, seq_length, num_input_variables]andyhas shape[num_steps - seq_length, output_len].