Skip to content

Time-Series Forecasting

Importing necessary modules

Next you need to import app in order to call functions involved in this module.

from aiaengine.api import app

Creating a time-series forecasting app

Now you can add a new app by specifying the required parameter values as follows.

create_app_response = client.apps.CreateApp(
    app.CreateAppRequest(
        name='App Name',
        description='What is this app about',
        dataset_id='id_of_dataset_app_is_created_for',
        problem_type='forecasting',
        target_columns=['target_column_1', 'target_column_2'],
        extra_columns={'timeColumn': 'time_column'},
        training_data_proportion=0.8
    )
)

Similar to the process of building a task for classification and regression, you need the name, and description and the dataset id to build an application for times-series forecasting. Here you need to specify the problem type as 'forecasting' for this task.

Particularly for time-series forecasting, you can specify one or more target columns corresponding to input target_columns. In the above example, we have two target columns 'target_column_1' and 'target_column_2' for forecasting. You also need to specify the time column in a forecasting application. We use 'time_column' as our time column in the example. At last, you can set up a ratio of train-test split using training_data_proportion which indicates the proportion of data used for training over the whole dataset. For time-series forecasting, the training set comes in sequence before the test set in chronological order.

app_id = create_app_response.id

Once created, an application is assigned a unique id, which is frequently used in related functions.