Skip to content

Commit 80da82d

Browse files
authored
Adding code snippet
1 parent a27e6bd commit 80da82d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,20 @@ test_labels = test_data.pop(label).values
106106
You can specify separate train and validation sets directly in the `AutoMLConfig` constructor.
107107

108108
### Rolling Origin Cross Validation
109-
For time series forecasting Rolling Origin Cross Validation (ROCV) is used to split time series in a temporally consistent way. ROCV divides the series into training and validation data using an origin time point. Sliding the origin in time generates the cross-validation folds. This strategy will preserve the time series data integrity and eliminate the risk of data leakage. ROCV is automatically used for forecasting tasks by passing the training and validation data together and setting the number of cross validation folds using `n_cross_validations`.
109+
For time series forecasting Rolling Origin Cross Validation (ROCV) is used to split time series in a temporally consistent way. ROCV divides the series into training and validation data using an origin time point. Sliding the origin in time generates the cross-validation folds.
110110

111111
![alt text](./media/how-to-auto-train-forecast/ROCV.svg)
112112

113+
This strategy will preserve the time series data integrity and eliminate the risk of data leakage. ROCV is automatically used for forecasting tasks by passing the training and validation data together and setting the number of cross validation folds using `n_cross_validations`.
114+
115+
```python
116+
automl_config = AutoMLConfig(task='forecasting',
117+
n_cross_validations=3,
118+
...
119+
**time_series_settings)
120+
```
121+
Learn more about the [AutoMLConfig](#configure-and-run-experiment).
122+
113123
## Configure and run experiment
114124

115125
For forecasting tasks, automated machine learning uses pre-processing and estimation steps that are specific to time-series data. The following pre-processing steps will be executed:

0 commit comments

Comments
 (0)