Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated weights column checks through BaseTransformer #221

Closed
limlam96 opened this issue Apr 8, 2024 · 2 comments · Fixed by #239
Closed

Automated weights column checks through BaseTransformer #221

limlam96 opened this issue Apr 8, 2024 · 2 comments · Fixed by #239
Assignees
Labels
help wanted Extra attention is needed

Comments

@limlam96
Copy link
Contributor

limlam96 commented Apr 8, 2024

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.

@limlam96 limlam96 added the help wanted Extra attention is needed label Apr 8, 2024
@limlam96
Copy link
Contributor Author

limlam96 commented Apr 9, 2024

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

@adamsardar
Copy link
Contributor

adamsardar commented Apr 9, 2024

If you're considering a lightweight class, consider using a mixin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
3 participants