category_encoders
category_encoders copied to clipboard
Encoders should possibly validate string arguments for validity
Recently I executed TargetEncoder(handle_missing='indicator') without any issue and it surprised me a bit.
A possible solution:
if handle_missing not in [None, 'error', 'return_nan', 'value']:
raise ValueError('Unexpected handle_missing value: ' + handle_missing)