Skip to main content

Time Series Models

To create a time series model it is necessary to specify a single dateTime column in the model's Request Schema.

Supported Timestamp Format

yyyy-MM-dd HH:mm:ss.SSS (e.g. 2021-02-11 16:47:35.985)

Tabular models are expected to produce one prediction per row of input dat where the predict() method of the model should output an object containing a list with the same number of elements as there are rows in the model_input data frame.

This requirement does not apply to the time series models, since, depending on the use case (e.g. forecasting, classification, sequence to sequence), the number of elements in the prediction list can be arbitrary. For this reason, the predict() method of the time series model should assume that the model_input data frame corresponds to a single time series instance, i.e. one frame containing a set of rows.

The navio API for time series models allows for prediction requests containing a single time series instance, i.e. a set of rows:

{
"rows": [
{
"Time": "2015-07-29 00:00:00.000",
"acc_0": "0.9180555898766518",
"acc_1": "-0.1124999994242935",
"acc_2": "0.5097222514293852",
"gyro_0": "-0.0549778714776039",
"gyro_1": "-0.0696386396884918",
"gyro_2": "-0.0308486949652433"
}
]
}

It's also possible to specify instances, i.e. a set of frames:

{
"frames": [
{
"rows": [
{
"Time": "2015-07-29 00:00:00.000",
"acc_0": "0.9180555898766518",
"acc_1": "-0.1124999994242935",
"acc_2": "0.5097222514293852",
"gyro_0": "-0.0549778714776039",
"gyro_1": "-0.0696386396884918",
"gyro_2": "-0.0308486949652433"
}
]
},
{
"rows": [
{
"Time": "2015-07-29 00:00:00.000",
"acc_0": "0.9180555898766518",
"acc_1": "-0.1124999994242935",
"acc_2": "0.5097222514293852",
"gyro_0": "-0.0549778714776039",
"gyro_1": "-0.0696386396884918",
"gyro_2": "-0.0308486949652433"
}
]
}
]
}