1

I have been reading about target encoding and its variants like Leave One Out, James Stein, etc. and in all cases, the target variable itself is usually binary (or can be divided into categories).

How would the calculations differ if the target variables was continuous?

cottontail
  • 312
  • 3
  • 4
  • 13

1 Answers1

1

It's not much different: just take the mean of the target in each category. (You could take some other aggregation, median, minimum, etc., but I've only ever seen mean.) This is the same as the "event rate" for a binary variable, when 0-1 encoded.

Ben Reiniger
  • 12,855
  • 3
  • 20
  • 63