skrub icon indicating copy to clipboard operation
skrub copied to clipboard

improve target encoder

Open GaelVaroquaux opened this issue 5 years ago • 0 comments

A good way of doing target encoding (or impact coding) is to compute the value to encoding in a left out subset of the data, to avoid overfitting, for instance in a cross-validation loop.

The following code (nicely contributed by dataiku) can be adapted: https://gist.github.com/GaelVaroquaux/0d477f34f2e1e8036737a7ac88cce1fc

GaelVaroquaux avatar Oct 29 '18 14:10 GaelVaroquaux