TimesDB offers flexible ways to generate predictions based on your specific needs.

Methods for Generating Predictions

Predictions can be made in the following ways:

  • By selecting datasets: You can generate predictions by selecting datasets using their IDs or tags.
  • By selecting series: Predictions can also be made by choosing series using their respective IDs.
  • Ad-hoc series in the prediction request: You can provide an ad-hoc series, consisting of timestamp and value pairs, in the prediction request.

Sync and Async Modes

TimesDB supports both synchronous (sync) and asynchronous (async) modes for generating predictions.

  • Sync mode: In this mode, the platform performs the predictions in real-time and returns the results immediately.
  • Async mode: In async mode, the prediction request is queued and processed by workers at a later time. Once the task is completed, TimesDB notifies the configured webhook endpoint.

Percentiles and Confidence Values

You can choose the required percentiles (confidence values) to be returned along with the median (p50). By default, p5, p25, p50, p75, and p95 are provided.

Predictin Models

Predictions can be generated using the foundational models provided by TimesDB or the fine-tuned models that you’ve created.

Response Format

The response to a prediction request contains the input series ID, as well as the predicted series IDs, along with their respective data points. These series IDs can be used as input for subsequent prediction requests.

Refer the Prediction API docs to know how to make a prediction request.

Plotting Predictions

In addition to JSON responses, TimesDB provides an API to plot the input and predicted values as a chart. This API returns the image in PNG format, which can be easily embedded in any required location.

Refer the Prediction Chart API docs to know how to get the prediction output as an image.