Hi Saravanan,
We don't have out-of-the-box solution for target encoding; however, we do have some main ingredients.
Full pass over the training data is needed to get the posterior probability of the target given particular categorical value and the prior probability of the target. In Transform this can only be done with analyzers, e.g. using
tft.vocabulary with `store_frequency=True` over a concatenated target+categorical column.
In order to map each value to the target encoding, resulting vocabulary file can be used in a mapper that will be remotely similar to
tft.apply_vocabulary but with several custom lookups: the lookups will have to aggregate probabilities of the categorical value and target.
Note that this approach is meant for a categorical column that doesn't have predetermined weights, a bit more manipulations may be needed if it does.
Ihor