tsam.hyperparametertuning¶
tsam.hyperparametertuning
¶
HyperTunedAggregations
¶
Source code in src/tsam/hyperparametertuning.py
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 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | |
__init__
¶
A class that does a parameter variation and tuning of the aggregation itself.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_aggregation
|
TimeSeriesAggregation
|
TimeSeriesAggregation object which is used as basis for tuning the hyper parameters. required |
required |
saveAggregationHistory
|
boolean
.. deprecated::
Use :func:`tsam.tuning.find_optimal_combination` or
:func:`tsam.tuning.find_pareto_front` instead.
|
Defines if all aggregations that are created during the tuning and iterations shall be saved under self.aggregationHistory. |
True
|
Source code in src/tsam/hyperparametertuning.py
identifyOptimalSegmentPeriodCombination
¶
Identifies the optimal combination of number of typical periods and number of segments for a given data reduction set.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataReduction
|
float
|
Factor by which the resulting dataset should be reduced. required |
required |
Returns:
| Type | Description |
|---|---|
|
noSegments, noTypicalperiods -- The optimal combination of segments and typical periods for the given optimization set. |
Source code in src/tsam/hyperparametertuning.py
identifyParetoOptimalAggregation
¶
Identifies the pareto-optimal combination of number of typical periods and number of segments along with a steepest decent approach, starting from the aggregation to a single period and a single segment up to the representation of the full time series.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
untilTotalTimeSteps
|
int
|
Number of timesteps until which the pareto-front should be determined. If None, the maximum number of timesteps is chosen. |
None
|
Returns:
| Type | Description |
|---|---|
|
None. Check aggregation history for results. All typical Periods in scaled form. |
Source code in src/tsam/hyperparametertuning.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | |
getNoPeriodsForDataReduction
¶
Identifies the maximum number of periods which can be set to achieve the required data reduction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
noRawTimeSteps
|
int
|
Number of original time steps. required |
required |
segmentsPerPeriod
|
int
|
Segments per period. required |
required |
dataReduction
|
float
|
Factor by which the resulting dataset should be reduced. required |
required |
Returns:
| Type | Description |
|---|---|
|
noTypicalPeriods -- Number of typical periods that can be set. .. deprecated:: This function is deprecated along with the HyperTunedAggregations class. |
Source code in src/tsam/hyperparametertuning.py
getNoSegmentsForDataReduction
¶
Identifies the maximum number of segments which can be set to achieve the required data reduction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
noRawTimeSteps
|
int
|
Number of original time steps. required |
required |
typicalPeriods
|
int
|
Number of typical periods. required |
required |
dataReduction
|
float
|
Factor by which the resulting dataset should be reduced. required |
required |
Returns:
| Type | Description |
|---|---|
|
segmentsPerPeriod -- Number of segments per period that can be set. .. deprecated:: This function is deprecated along with the HyperTunedAggregations class. |