﻿# Monash TSF files: metadata flags do not replace an observation mask

Read Monash TSF frequency, horizon and missing-value metadata separately from each series, preserving question-mark positions and variable lengths.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-monash-tsf-metadata-not-observation-mask/
Language: en

## Preserve the format before building a tensor

A forecasting loader may successfully produce a rectangular array while discarding the information needed to interpret it. Monash TSF files describe attributes and collection metadata before listing individual series. Treat that header as a schema, rather than an inconvenient preamble removed by a generic comma-separated reader. A numeric tensor alone cannot explain which series a row represents or why padded positions exist.

## Read frequency and horizon as separate fields

The [author loader](https://raw.githubusercontent.com/rakshitha123/TSForecasting/master/utils/data_loader.py) returns the parsed frame alongside frequency, forecast horizon, missingness and equal-length indicators. These are different properties. Frequency describes observation spacing; horizon describes a forecasting task when supplied. Neither establishes the actual start timestamp of every row. Keep returned metadata with the parsed attributes instead of recovering it from a filename or hardcoded benchmark nickname.

## Keep missing positions distinct from padding

The loader maps a question mark to a configurable missing-value representation. That substitution does not create a per-position observation mask automatically for every downstream framework. Derive the mask before normalization, and preserve actual zeros as observations. A padded suffix for a shorter series has a different origin from a missing measurement within an existing sequence, even if both ultimately use the same numeric placeholder in an accelerator batch.

## Match the reader to the archive revision

The [reference repository](https://raw.githubusercontent.com/rakshitha123/TSForecasting/master/README.md) provides the format and loading context, while the [archive paper](https://arxiv.org/abs/2105.06643) explains the forecasting collection. Pin the downloaded record and reader revision together. The historical Python implementation has particular attribute types, date parsing and file encoding; replacing it with a modern library requires an equivalence check, rather than assuming every TSF reader makes identical choices.

## Test reconstruction at the dataset boundary

Load a record with missing values and a variable-length collection, then reconstruct series identities, lengths and missing positions from the exported representation. Compare these properties before testing forecasting accuracy. [Tensor-axis conventions](/journal/tensor-axes-batch-sequence-hidden/) help describe the batch, and [time-aware splitting](/journal/data-guide-temporal-split-availability/) explains a separate evaluation boundary. Correct parsing makes the experiment identifiable; it does not select the model, establish commercial-use rights or prove that a historical benchmark matches an operational workload.
