Skip to content

Commit 4755668

Browse files
address review
1 parent 0cb7bcc commit 4755668

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

articles/machine-learning/how-to-auto-train-forecast.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ For this article you need,
4343

4444
* The ability to launch AutoML training jobs. Follow the [how-to guide for setting up AutoML](how-to-configure-auto-train.md) for details.
4545

46-
[!INCLUDE [automl-sdk-version](../../includes/machine-learning-automl-sdk-version.md)]
47-
4846
## Training and validation data
4947

5048
Input data for AutoML forecasting must contain valid time series in tabular format. Each variable must have its own corresponding column in the data table. AutoML requires at least two columns: a **time column** representing the time axis and the **target column** which is the quantity to forecast. Other columns can serve as predictors. For more details, see [how AutoML uses your data](./concept-automl-forecasting-methods.md#how-automl-uses-your-data).
@@ -337,7 +335,7 @@ returned_job.services["Studio"].endpoint
337335

338336
## Forecasting with a trained model
339337

340-
Once you've used to AutoML to train and select a best model, the next step is to evaluate the model. If it meets your requirements, you can use it to generate forecasts into the future. This section shows how to write Python scripts for evaluation and prediction (inference). For an example of deploying a trained model with an inference script, see our [example notebook](https://github.com/Azure/azureml-examples/blob/main/sdk/python/jobs/automl-standalone-jobs/automl-forecasting-github-dau/auto-ml-forecasting-github-dau.ipynb).
338+
Once you've used AutoML to train and select a best model, the next step is to evaluate the model. If it meets your requirements, you can use it to generate forecasts into the future. This section shows how to write Python scripts for evaluation and prediction. For an example of deploying a trained model with an inference script, see our [example notebook](https://github.com/Azure/azureml-examples/blob/main/sdk/python/jobs/automl-standalone-jobs/automl-forecasting-github-dau/auto-ml-forecasting-github-dau.ipynb).
341339

342340
### Evaluating model accuracy with a rolling forecast
343341

@@ -403,7 +401,7 @@ In this sample, the step size for the rolling forecast is set to one which means
403401

404402
### Prediction into the future
405403

406-
The [forecast_quantiles()](/python/api/azureml-train-automl-client/azureml.train.automl.model_proxy.modelproxy#forecast-quantiles-x-values--typing-any--y-values--typing-union-typing-any--nonetype----none--forecast-destination--typing-union-typing-any--nonetype----none--ignore-data-errors--bool---false-----azureml-data-abstract-dataset-abstractdataset) function allows specifications of when predictions should start, unlike the `predict()` method, which is typically used for classification and regression tasks. The forecast_quantiles() method, by default, generates a point forecast that doesn't have a cone of uncertainty around it. Learn more in the [Forecasting away from training data notebook](https://github.com/Azure/azureml-examples/blob/main/v1/python-sdk/tutorials/automl-with-azureml/forecasting-forecast-function/auto-ml-forecasting-function.ipynb).
404+
The [forecast_quantiles()](python/api/azureml-training-tabular/azureml.training.tabular.models.forecasting_pipeline_wrapper_base.forecastingpipelinewrapperbase#azureml-training-tabular-models-forecasting-pipeline-wrapper-base-forecastingpipelinewrapperbase-forecast-quantiles) generates forecasts for given quantiles of the prediction distribution. This method thus provides a way to get a point forecast with a cone of uncertainty around it. Learn more in the [Forecasting away from training data notebook](https://github.com/Azure/azureml-examples/blob/main/v1/python-sdk/tutorials/automl-with-azureml/forecasting-forecast-function/auto-ml-forecasting-function.ipynb).
407405

408406
In the following example, you first replace all values in `y_pred` with `NaN`. The forecast origin is at the end of training data in this case. However, if you replaced only the second half of `y_pred` with `NaN`, the function would leave the numerical values in the first half unmodified, but forecast the `NaN` values in the second half. The function returns both the forecasted values and the aligned features.
409407

@@ -413,20 +411,20 @@ You can also use the `forecast_destination` parameter in the `forecast_quantiles
413411
label_query = test_labels.copy().astype(np.float)
414412
label_query.fill(np.nan)
415413
label_fcst, data_trans = fitted_model.forecast_quantiles(
416-
test_dataset, label_query, forecast_destination=pd.Timestamp(2019, 1, 8))
414+
test_dataset, label_query, forecast_destination=pd.Timestamp(2019, 1, 8)
415+
)
417416
```
418417

419-
You may want to understand the predictions at a specific quantile of the distribution. For example, when the forecast is used to control inventory like grocery items or virtual machines for a cloud service. In such cases, the control point is usually something like "we want the item to be in stock and not run out 99% of the time". The following sample demonstrates how to specify which quantiles you want to see for your predictions, such as 50th or 95th percentile:
418+
No quantiles are specified here, so only the point forecast is generated. You may want to understand the predictions at a specific quantile of the distribution. For example, when the forecast is used to control inventory like grocery items or virtual machines for a cloud service. In such cases, the control point is usually something like "we want the item to be in stock and not run out 99% of the time". The following sample demonstrates how to specify forecast quantiles, such as 50th or 95th percentile:
420419

421420
```python
422421
# Get forecasts for the 5th, 50th, and 90th percentiles
423422
fitted_model.quantiles = [0.05, 0.5, 0.9]
424423
fitted_model.forecast_quantiles(
425-
test_dataset, label_query, forecast_destination=pd.Timestamp(2019, 1, 8))
424+
test_dataset, label_query, forecast_destination=pd.Timestamp(2019, 1, 8)
425+
)
426426
```
427427

428-
If you don't specify any quantiles then only the median predictions are returned.
429-
430428
You can calculate model metrics like, root mean squared error (RMSE) or mean absolute percentage error (MAPE) to help you estimate the models performance. See the Evaluate section of the [Bike share demand notebook](~/azureml-examples-main/v1/python-sdk/tutorials/automl-with-azureml/forecasting-bike-share/auto-ml-forecasting-bike-share.ipynb) for an example.
431429

432430
After the overall model accuracy has been determined, the most realistic next step is to use the model to forecast unknown future values.
@@ -457,7 +455,7 @@ Grouping is a concept in time series forecasting that allows time series to be c
457455

458456
### Many models
459457

460-
The Azure Machine Learning many models solution with automated machine learning allows users to train and manage millions of models in parallel. Many models The solution accelerator uses [Azure Machine Learning pipelines](concept-ml-pipelines.md) to train the model. Specifically, a [Pipeline](/python/api/azureml-pipeline-core/azureml.pipeline.core.pipeline%28class%29) object and [ParalleRunStep](/python/api/azureml-pipeline-steps/azureml.pipeline.steps.parallelrunstep) are used and require specific configuration parameters set through the [ParallelRunConfig](/python/api/azureml-pipeline-steps/azureml.pipeline.steps.parallelrunconfig).
458+
The Azure Machine Learning many models solution with automated machine learning allows users to train and manage millions of models in parallel. The Many Models Solution Accelerator uses [Azure Machine Learning pipelines](concept-ml-pipelines.md) to train the model. Specifically, a [Pipeline](/python/api/azureml-pipeline-core/azureml.pipeline.core.pipeline%28class%29) object and [ParalleRunStep](/python/api/azureml-pipeline-steps/azureml.pipeline.steps.parallelrunstep) are used and require specific configuration parameters set through the [ParallelRunConfig](/python/api/azureml-pipeline-steps/azureml.pipeline.steps.parallelrunconfig).
461459

462460

463461
The following diagram shows the workflow for the many models solution.

0 commit comments

Comments
 (0)