Goal: replace a categorical column with a numeric column (like one-hot encoding)

Use one column (like frequency encoding). Except instead of replacing the category with the frequency it appears, we replace it with the mean of the target that appears

Variations:

  • replace it with the standard deviation of the target that appears