You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update_transformers and update_transformers_by_sdtype: Also allow the use of None, though this is not the preferred approach
ht=HyperTransformer()
ht.detect_initial_config(data)
# the following methods will work but will not be mentioned in the docsht.update_transformers(column_name_to_transformer={
'column_B': None
})
ht.update_transformers_by_sdtype(sdtype='categorical', transformer=None)
transformed=ht.fit_transform(data)
remove_transformers and remove_transformers_by_sdtype: The preferred way to remove transformers from the config
ht=HyperTransformer()
ht.detect_initial_config(data)
# remove transformers for the given list of column namesht.remove_transformers(column_names=['column_B'])
# remove the transformers for everything in the given sdtypeht.remove_transformers_by_sdtype(sdtype='categorical')
transformed=ht.fit_transform(data)
get_config: Return (and print out) None for the appropriate transformer(s)
Problem Description
It should be possible to skip the transformation of select columns by specifying that no transformation is needed in the config.
Expected behavior
None
in place of a transformer object to specify that no transformer is needed for the columnremove_transformers
andremove_transformers_by_sdtype
for better usability in removing transformers from the configNone
, the column is carried over as-is during thetransform
call; no changes in value or column nameAdditional context
This change will touch many methods.
set_config
: Allow the use ofNone
in place of a transformer objectupdate_transformers
andupdate_transformers_by_sdtype
: Also allow the use ofNone
, though this is not the preferred approachremove_transformers
andremove_transformers_by_sdtype
: The preferred way to remove transformers from the configget_config
: Return (and print out)None
for the appropriate transformer(s)User Validation
1. Invalid sdtype
Check the
sdtype
the user passes intoremove_transformers_by_sdtype
2. Invalid column name
3. Sdtype & transformer are not compatibleIgnore this case. It does not apply for these functions.
4. User tries to use either of these functions after already calling fit
The text was updated successfully, but these errors were encountered: