Machine Learning

Time Series

A time series is a sequence of measurements of one quantity recorded at successive points in time, such as hourly machine temperature or daily sales, where the order of the observations carries meaning.

What is a time series?

A time series is a sequence of measurements of the same quantity recorded at successive points in time. Hourly temperature from a kiln, daily sales for a store, minute-by-minute flow through a pump, and monthly claims counts are all time series. The defining property is that order matters. Each value is related to the values before it, which is exactly what ordinary machine learning methods assume is not the case.

Analysts usually break a series into components: a long-run trend, seasonality that repeats on a daily, weekly, or yearly cycle, longer irregular cycles tied to the economy or the business, and noise. A series whose statistical behavior does not change over time is called stationary, and many classical methods assume it or require transforming the data until it is.

Why time series matter

Much of the data a company holds is a time series: sensor readings, transactions, call volumes, cash positions, web traffic, and energy use. Working with it well requires different habits. Training and test data must be split by time rather than shuffled, or the model learns from the future and reports accuracy it will never achieve in production, a form of information leakage. Features are built from lags and rolling windows, such as the average of the last seven days. Gaps, time zones, and daylight saving changes all need explicit handling. Storage is also specialized, with time-series databases and data historians tuned for appending and querying by time range.

Time series in practice

A municipal water utility records flow and pressure every minute at each pump station, held in a data historian. The analytics team resamples the data to fifteen-minute averages and compares each night’s minimum flow with the pattern for that day of the week and season. A minimum that rises and stays high points to a leak somewhere in the zone, often weeks before it surfaces. The same series, aggregated to daily totals, feeds the utility’s demand planning and its regulatory reports.

What to watch for

  • Store timestamps with time zones and decide how daylight saving transitions are handled before the first analysis.
  • Decide how missing intervals are filled, and record it, because the choice changes the results.
  • Never shuffle time series data into random training and test splits.
  • Match the granularity to the question, since daily averages hide the spikes that matter for equipment and fraud.

← Back to AI Glossary