﻿# CatBoost ordered target statistics: permutation history is different from calendar history

Explain CatBoost categorical target statistics without confusing ordered encoding with an automatic chronological evaluation split or universal protection against external leakage.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-catboost-ordered-target-statistics-not-chronological-split/
Language: en

## Identify the problem the ordering addresses

Naively encoding a category with the target mean calculated from the same training rows can let an example influence its own representation. The [CatBoost paper](https://arxiv.org/abs/1706.09516) explains ordered categorical processing and prediction-shift concerns. This mechanism belongs inside model training. It does not automatically solve every data-availability or evaluation problem surrounding the application, nor does its name imply that the input has been split according to real calendar time.

## Follow the permutation-based history

The [categorical transformation guide](https://catboost.ai/docs/en/concepts/algorithm-main-stages_cat-to-numberic) describes random object ordering and statistics based on earlier objects in that ordering. Priors and configured statistic types affect the resulting numerical features. That artificial processing order is distinct from the chronological order of business events. A retrospective forecasting evaluation still needs an explicit as-of boundary, even when its model internally uses an ordered categorical procedure.

## Preserve the native categorical path

The [categorical feature guide](https://catboost.ai/docs/en/features/categorical-features) distinguishes one-hot treatment and calculated statistics, with behavior depending on configuration and task. External preprocessing can replace the intended native mechanism. Preserve categorical declarations and fitted model state rather than assuming that a manually generated target-mean column is equivalent to the library's ordered process. Equivalent-looking numerical columns need not have the same training-time information provenance.

## Keep outside leakage controls independent

A feature derived from a future outcome can remain inappropriate even if CatBoost processes its category correctly. Likewise, a test set sharing prohibited entities with training is not repaired by ordered statistics. The [entity-group split guide](/journal/data-guide-entity-group-split-design/) provides a separate population control. Describe which boundary each mechanism protects so an algorithmic feature-processing property is not promoted into a blanket statement that the whole experiment is leakage-free.

## Validate the complete preparation and split

Review categorical fields, their source availability, configured transformations and the evaluation population before comparing metrics. The [TabPFN schema guide](/journal/fg2-tabpfn-categorical-numeric-text-schema-boundary/) offers a contrasting preparation contract. A credible result preserves both internal target-statistic handling and external independent evaluation. It explains the meaning of ordered processing without treating it as a substitute for chronological splitting, entity isolation or checking that every input feature was available at the intended prediction moment.
