AutoTS#
Use DataRobot AutoTS to train time series challenger models on a dataset and establish a champion.
Under Construction
We are working on various enhancements to time series in drx.
We would love to incorporate contributions from the DataRobot community! If you think you can handle a part of this feature, please reach out to Marcus, Luke or Marshall
Key functional aspects of AutoTS:
Prior to model training, time-series feature engineering (e.g. derivation of temporally lagged variables) will be automatically performed on the training data.
For non-stationary series, a differencing strategy may automatically be applied prior to training.
Datetime partitioning will be used for model evaluation and models can be evaluated across a forecast horizon of interest as well as across multiple backtests.
For certain model types, independent models will be automatically trained for each forecast horizon of interest.
The feature engineering, datetime partitioning, and forecast horizon capabilities of
AutoTS provide many opportunities for further user configuration and customization.
See the drx DRConfig class and it’s attributes to explore
the breadth of TS-related options.
As with the drx AutoML model, prediction and
deployment methods execute on the present champion model at the time
of calling. Training is performed within a new, automatically created DataRobot project.
Usage#
Train#
import pandas as pd
import datarobotx as drx
df = pd.read_csv('https://s3.amazonaws.com/datarobot_public_datasets/DR_Demo_Google_AdWords.csv')
train = df[df['Date']<='2017-10-20']
model = drx.AutoTSModel()
model.fit(train, target='SalesCount', datetime_partition_column='Date')
Train with additional configuration#
config = drx.DRConfig()
config.Partitioning.DateTime.autopilot_data_selection_method = 'rowCount'
config.Featurization.AutoTS.differencing_method = 'none'
model_2 = drx.AutoTSModel(feature_window=(-10, 0),
forecast_window=(1, 3),
name='My AutoTS project',
**config)
model_2.fit(train, target='SalesCount', datetime_partition_column='Date')
Predict#
DataRobot time-series models require multiple rows of historical data to make predictions. The number of historical rows required for predictions varies depending on the feature derivation window and differencing settings, see the DataRobot documentation for additional information.
forecast_point = '2017-11-25'
fdw_start = '2017-11-15'
filter_condition = (df['Date'] >= fdw_start) & (df['Date'] <= forecast_point)
test = df.loc[filter_condition]
predictions = model_2.predict(test)
Predict bulk#
drx will attempt to automatically request bulk time series predictions for all valid
forecast points and distances for the given prediction dataset.
test = df[df['Date']>'2017-10-20']
predictions_bulk = model_2.predict(test)
Deploy#
deployment = model.deploy()
API Reference#
|
AutoTS orchestrator |
|
DataRobot configuration |
|
DataRobot ML Ops deployment |