create_what_if_analysis
async
¶
create_what_if_analysis(
what_if_analysis_name: Name,
forecast_arn: Arn,
*,
config_overrides: Optional[AsyncforecastClientConfig] = None,
time_series_selector: Optional[TimeSeriesSelector] = None,
tags: Optional[Tags] = None,
) -> CreateWhatIfAnalysisResponse
What-if analysis is a scenario modeling technique where you make a hypothetical change to a time series and compare the forecasts generated by these changes against the baseline, unchanged time series. It is important to remember that the purpose of a what-if analysis is to understand how a forecast can change given different modifications to the baseline time series.
For example, imagine you are a clothing retailer who is considering an end of season sale to clear space for new styles. After creating a baseline forecast, you can use a what-if analysis to investigate how different sales tactics might affect your goals.
You could create a scenario where everything is given a 25% markdown, and another where everything is given a fixed dollar markdown. You could create a scenario where the sale lasts for one week and another where the sale lasts for one month. With a what-if analysis, you can compare many different scenarios against each other.
Note that a what-if analysis is meant to display what the forecasting model has learned and how it will behave in the scenarios that you are evaluating. Do not blindly use the results of the what-if analysis to make business decisions. For instance, forecasts might not be accurate for novel scenarios where there is no reference available to determine whether a forecast is good.
The TimeSeriesSelector object defines the items that you want in the what-if analysis.
Parameters:
-
what_if_analysis_name(Name) –The name of the what-if analysis. Each name must be unique.
-
forecast_arn(Arn) –The Amazon Resource Name (ARN) of the baseline forecast.
-
time_series_selector(Optional[TimeSeriesSelector], default:None) –Defines the set of time series that are used in the what-if analysis with a
TimeSeriesIdentifiersobject. What-if analyses are performed only for the time series in this object.The
TimeSeriesIdentifiersobject needs the following information:-
DataSource -
Format -
Schema
-
-
tags(Optional[Tags], default:None) –A list of tags to apply to the what if forecast.
Raises:
-
InvalidInputException–We can't process the request because it includes an invalid value or a value that exceeds the valid range.
-
LimitExceededException–The limit on the number of resources per account has been exceeded.
-
ResourceAlreadyExistsException–There is already a resource with this name. Try again with a different name.
-
ResourceInUseException–The specified resource is in use.
-
ResourceNotFoundException–We can't find a resource with that Amazon Resource Name (ARN). Check the ARN and try again.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_forecast/_services/async_forecast.py
1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 | |