﻿# PSM anomaly labels align through timestamps rather than CSV row convenience

Preserve PSM timestamp indices separately from sensor features, join test labels by their actual coordinate, and keep training-only scaling and derived-window offsets explicit.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-psm-timestamp-index-anomaly-label-alignment/
Language: en

## CSV columns have distinct responsibilities

A PSM adapter may read every numeric column as a sensor and remove the first label column by position. That procedure is fragile if it never identifies what the columns mean. Time, sensor values, and anomaly targets belong to different parts of the data contract.

The [publisher repository](https://raw.githubusercontent.com/eBay/RANSynCoders/main/README.md) distributes Pooled Server Metrics with its anomaly-detection workflow. Preserve the source schema before changing array layout for another network.

## The example treats time as an index

The [official notebook](https://raw.githubusercontent.com/eBay/RANSynCoders/main/example.ipynb) reads timestamp-indexed tables and constructs time information separately from feature values. A timestamp is not automatically another interchangeable sensor dimension.

Keep its units and reference frame when converting files. Replacing timestamps by a fresh row index changes the coordinate system and can hide gaps introduced by filtering. The [tensor-axis guide](/journal/tensor-axes-batch-sequence-hidden/) helps distinguish observation identity from feature position.

## Test labels preserve their own timestamp field

The [released label file](https://raw.githubusercontent.com/eBay/RANSynCoders/main/data/test_label.csv) contains timestamp and label fields. Align them with the corresponding test observations, checking missing or duplicate coordinates rather than assuming that independently filtered tables still share row order.

If a window model drops an initial history segment, translate its scores back to those coordinates. Trimming a label vector until its length fits does not establish correct temporal correspondence.

## Scaling and time preparation are separate operations

The example fits its feature scaler on training values and transforms test values with that fitted resource. Preserve that scope when reproducing the preparation. A separately refitted test scaler defines another experiment.

Likewise, keep the time input expected by the selected model separate from feature normalization. An adapter for a model without explicit timestamps may omit that model input intentionally, but should retain timestamp provenance for evaluation and export.

## Audit joins around filtered rows

Inspect a short test interval before and after missing-value handling, window construction, and prediction export. Verify that each score retains a recoverable observation coordinate and original label.

The [data identity guide](/journal/data-guide-coco-instance-caption-identities/) explains that joining requirement. Correct alignment supports the stated benchmark protocol; it does not establish causal fault localization, continuous production performance, or equivalence between all PSM preprocessing recipes that happen to return equally sized arrays.
