Open
Description
Describe the workflow you want to enable
The current implementation of TargetEncoder
seems to calculate (shrinked) averages of y
. In cases with sample_weights
, it would be more natural to work with (shrinked) weighted averages.
Describe your proposed solution
In case of sample_weights
, shrinked averages should be replaced by corresponding shrinked weighted averages.
However, I am not 100% sure if sample_weights
are accessable by a transformer.
Describe alternatives you've considered, if relevant
The alternative is to continue ignoring sample weights.
Additional context
No response