# different numeric value of the same category in Target Statistics of CatBoost

Here is the famous paper for CatBoost:

CatBoost: unbiased boosting with categorical features

https://arxiv.org/pdf/1706.09516.pdf

Take Leave-one-out TS as a example,

1. it seems that the same category in different samples has different numeric value. Does it make sense? e.g. $$x^2_4 = "cat"$$ with value 2.5; and $$x^2_6 = "cat"$$ with value 5;

2. Why not simply let training examples and testing examples both $$D_k = D?$$ Then there is no target leakage.

Another question has been asked in

why do we need to numeric the categorical features in Decision Tree

I understand that all the tree models (including GBDT) can directly deal with the categorical features. And the motivation of numeric is that the categories of feature may not be comparable and we need to give them a numeric value to make them ordered to process the optimal splitting (like LightGBM). Is it right?