Generic Timeseries Forecasting

Introduction

AI-based generic timeseries forecasting, using a simple simulated thermostat dataset.

Dataset and Model Details

Dataset

This example uses a simulated thermostat dataset that models room temperature controlled by an ON/OFF heater with hysteresis. The heater turns ON when temperature drops below 20 C and turns OFF when it rises above 24 C.

Parameter

Value

Sensor

Temperature Sensor (Simulated)

Channels

1 (Temperature in C)

Samples per File

1,000 timesteps

Total Files

15 (10 train, 2 validation, 3 test)

Temperature Range

19.7 C to 24.1 C

Model Architecture

  • The model used is FCST_LSTM10, a lightweight single-layer LSTM (Long Short-Term Memory) network with a hidden size of 10 and approximately 542 trainable parameters.

  • Inference run on Cortex M33 CPU

Input Features

The model takes 4D input (N,C,H,W):

  • N (1): batch size, restricted to 1

  • C (1): channels, 1 for single temperature variable

  • H (32): number of historical timesteps (frame size) used for prediction

  • W (1): width, restricted to 1 for timeseries applications

Output

The model produces an output tensor of shape (1, 2), representing the predicted temperature values for the next 2 timesteps (i.e. Forecast Horizon = 2).

Feature Extraction Configuration

SimpleWindow transform is used which segments the continuous temperature stream into fixed-length windows of 32 consecutive timesteps with a stride of 10%. Each window becomes one input sample, with the next 2 timesteps serving as the forecast target.