Skip to content

Conversation

@EssamWisam
Copy link
Collaborator

Closes #10 it was tricky to implement because for some methods, the new columns added are not directly related to the levels of the column (eg, target encoding where it's related to the classes)

:num_classes => (task == "Regression") ? -1 : length(y_classes),
:y_stat_given_feat_level => y_stat_given_feat_level,
:encoded_features => encoded_features,
:y_classes => (task == "Regression") ? nothing : y_classes,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine but I'm curious, is there a reason to use a dictionary for the cache? More standard would be to use a named tuple, or if this needs to be mutable, a mutable struct.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There isn't indeed and I plan to replace them all with named-tuples as in #5. Such action would be deterministic so I was waiting to merge the encoding types PR (and maybe this one) to avoid conflicts.

Copy link
Member

@ablaom ablaom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate the non-trivial work needed here and the attention to detail in the tests. Many thanks 🙏🏾

EssamWisam and others added 5 commits May 15, 2025 07:30
Co-authored-by: Anthony Blaom, PhD <[email protected]>
Co-authored-by: Anthony Blaom, PhD <[email protected]>
Co-authored-by: Anthony Blaom, PhD <[email protected]>
Co-authored-by: Anthony Blaom, PhD <[email protected]>
@EssamWisam EssamWisam merged commit 98893ea into main May 16, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When creating new columns use category names instead of numbers

3 participants