0
$\begingroup$

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?

$\endgroup$

1 Answer 1

0
$\begingroup$

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.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.