How forecasting works

Temporis forecasts by treating your time series as a sequence a large model reads and continues — the way a language model continues text. This page builds that mental model before you touch the API.

Forecasting is sequence prediction

A language model reads a stretch of text and predicts what comes next. Temporis does the same thing with numbers. It reads the recent history of your series and continues it, one step at a time.

The model has already seen an enormous variety of time series — demand that spikes on weekends, prices that drift, energy load that cycles daily. From all of that it learned what tends to come next given what came before. So forecasting becomes a single, general question: given this history, what is a plausible continuation?

This is a different way of working than classical forecasting. Normally you would choose a model family, then fit its parameters to one series at a time — picking trend and seasonal terms, tuning them, and refitting whenever the data shifts. Temporis skips per-series model-building. You hand it the history and it continues the sequence directly, drawing on patterns learned across many series.

From numbers to tokens

Before the model can read your series, the raw values are turned into a sequence of discrete tokens — and the model's output is turned back into numbers. The pipeline runs in stages:

Resample
Clean the series and snap it onto a regular time grid, so the spacing between points is uniform.
Normalize
Rescale values into a common range learned from your data's typical spread (roughly its 1st-to-99th percentile band), so different series look comparable to the model.
Patch & compress
Chunk the grid into patches and compress each patch with a frequency transform. A patch is the unit the model reads and writes at a time.
Quantize
Map the compressed patches into a vocabulary of discrete tokens — the alphabet the model actually sees.
Continue
The model reads the token sequence and generates a continuation, just as a language model continues text.
Decode
Turn the generated tokens back into numbers, undoing the normalization so the forecast lands on your data's real scale.

Patches are the key idea here: they set the model's reading and writing unit. The model does not move one raw observation at a time — it moves a patch at a time, which is why the forecast advances in steps rather than single points.

You control this encoding

The settings on a data profile — its interval, patch_len, and patch_spacing — determine how your raw data is resampled and chunked into the patches above. Tuning the profile is how you adjust the encoding for your series.

Why a distribution, not a single number

Generation is sampling. Each time the model continues the sequence, it draws tokens rather than committing to one fixed answer, so two runs on the same history can produce two different futures. That is a feature, not noise.

A single prediction request asks for several continuations at once. The count parameter sets how many independent trajectories to draw; each is a complete, self-consistent path into the future. Together they form a probabilistic forecast: a cloud of plausible outcomes rather than one line.

Two controls shape how those draws are sampled. temperature sets how adventurous each step is — higher spreads the samples out, lower keeps them clustered near the model's most-likely path. top_p trims the unlikely tail before sampling. Every returned trajectory also carries a loss, which ranks how typical the model found it, so you can pick a representative path or weight the set.

The real-world value is the spread. Instead of one guess that is almost certainly slightly wrong, you see the range of futures the model considers plausible — enough to read best case, worst case, and how wide the uncertainty really is.

See Predictions & sampling for how to read the response, and Working with prediction samples for turning a set of trajectories into intervals.

Where data profiles fit

A data profile is the saved recipe that binds your raw data to the encoding above. It points at a data source, names the series to read, and fixes the knobs that drive resampling and patching — so every prediction against that profile reads your data the same way.

The key knobs are interval (the resampling bucket in seconds), patch_len and patch_spacing (the size and stride of each patch), num_patches (how much history to read as context), and transforms like use_diffs for series that grow multiplicatively. The full list, with guidance on choosing each, lives in Data profiles.

Next steps