0
$\begingroup$

There is a method named Target statistics to deal with categorical features in the catboost paper. I still some confusion about the mathematical form. Could you some guys to expain how to compute it!

$$ \hat{x}^i_k = \frac{\sum^{p-1}_{j=1}[x_{\sigma_{j},k}=x_{\sigma_p,k}]Y_{\sigma_j}+a\cdot P}{\sum^{p-1}_{j=1}[x_{\sigma_{j},k}=x_{\sigma_p,k}]+a}$$

$\endgroup$
3
  • $\begingroup$ "Target" is the variable to be predicted. The formula you posted is a group-by average with laplace smoothing. $\endgroup$ Commented Sep 16, 2020 at 10:04
  • $\begingroup$ @anymous.asker, there's one additional tweak with catboost, indicated in the formula by the sigma: you make these calculations according to a given permutation of the data, and each point's encoding only looks at the "previous" points in calculating the smoothed averages. $\endgroup$
    – Ben Reiniger
    Commented Sep 17, 2020 at 2:49
  • $\begingroup$ Hi thanks for your comments. @anymous.asker. How to compute the previous p $\endgroup$
    – tktktk0711
    Commented Sep 21, 2020 at 8:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.