Skip to main content
Skip table of contents

tw.endpoints.auto_forecast.post

tw.endpoints.auto_forecast.post(configuration=dict,dataset=pandas.DataFrame)

Submit an auto-forecast job.
POST ``/auto-forecast``

Parameters

configuration : dict

Auto-forecast configuration payload.

dataset : pandas.DataFrame

Time-series data serialised as CSV and sent as a multipart file.

Returns

dict

API response containing at least ``"id"`` (the new job identifier).

Example Configuration

CODE
auto_forecasting_configuration = {
    'preprocessing': {
        'training_rows': [{'from': '2013-01-01 00:00:00','to': '2014-12-31 00:00:00'}],
        'prediction_rows': [{'from': '2013-01-01 00:00:00','to': '2015-09-17 00:00:00'}],
        'columns': [
            'string'
        ],
        'imputation': {
            'common': {'type': 'linear','max_gap_length': 0},
            'individual': [{'column_name': 'string','value': {'type': 'linear','max_gap_length': 0}}]
        },
        'time_scaling': {
            'time_scale': {'base_unit': 'hour','value': 1},
            'aggregations': {
                'common': 'mean',
                'individual': [
                    {'column_name':'string','value':'mean'}
                ]
            },
            'drop_empty_rows': True
        }
    },
    'engine': {
        'target_column': 'target_column',
        'holiday_column': 'string',
        'prediction_from': {'base_unit': 'sample','value': 1},
        'prediction_to': {'base_unit': 'sample','value': 7},
        'target_offsets': 'combined',
        'predictor_offsets': 'common',
        'allow_offsets': True,
        'offset_limit': 0,
        'normalization': True,
        'max_feature_count': 20,
        'transformations': [
            'exponential_moving_average',
            'rest_of_week',
            'periodic',
            'intercept',
            'piecewise_linear',
            'time_offsets',
            'polynomial',
            'identity',
            'simple_moving_average',
            'month',
            'trend',
            'day_of_week',
            'fourier',
            'public_holidays',
            'one_hot_encoding'
        ],
        'daily_cycle': True,
        'confidence_level': 90,
        'data_alignment': [
            {'column_name': 'string','timestamp': 'yyyy-mm-dd hh:mm:ssZ'}
        ],
        'prediction_boundaries': {
            'type': 'explicit',
            'max_value': 100,
            'min_value': 0
        }
    }
}

Example Usage

CODE
auto_forecast_post_response = tw.endpoints.auto_forecast.post(
    configuration = auto_forecasting_configuration,
    dataset = dataset
)

Example Output

CODE
auto_forecast_id = auto_forecast_post_response['id']
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.