Closed limlam96 closed 2 months ago
Leaning towards having a light WeightedBaseTransformer class that inherits from BaseTransformer and handles this stuff. Transformers would then have to inherit from the appropriate parent class
If you're considering a lightweight class, consider using a mixin?
What? Many transformers rely on a weights column, and many contain duplicated checks on this column. BaseTransformer implements a check_weights_column method, but this is not called by BaseTransformer.fit/transform - if there are no objections suggest automatically calling this when weight_column is provided. Can then capture appropriate tests in one of the generic test classes, and delete duplicated checks across transformers.