timeseries_preprocessing
timeseries_preprocessing
¶
Time series preprocessing utilities for Safe Synthesizer training.
Functions:
| Name | Description |
|---|---|
process_timeseries_data |
Resolve and prepare deterministic or flexible time-series training data. |
process_timeseries_data(training_df, config)
¶
Resolve and prepare deterministic or flexible time-series training data.
Normalizes grouped and ungrouped time series into the same training path.
When no group column is configured, a reserved pseudo-group column
(PSEUDO_GROUP_COLUMN) is added so the whole dataset is treated as one
sequence. Fixed-shape groups retain deterministic time-range processing.
Groups with different lengths, ranges, or unasserted intervals are
automatically transformed to use a generated sequence index and final-row
marker. The passed configuration is updated with the selected
representation and resolved timestamp metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
training_df
|
DataFrame
|
The training DataFrame. |
required |
config
|
SafeSynthesizerParameters
|
Configuration containing time-series and data settings. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
Processed training data, the resolved configuration, and the |
SafeSynthesizerParameters
|
time-series metadata to persist with the model, or |
TimeseriesMetadata | None
|
non-time-series data. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If a configured timestamp or ordering column is missing, or if the timestamp format is incompatible with the source data. |
DataError
|
If required source values are null, timestamps cannot be parsed, or timestamps do not follow an asserted interval. |
Source code in src/nemo_safe_synthesizer/training/timeseries_preprocessing.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | |