category_encoders icon indicating copy to clipboard operation
category_encoders copied to clipboard

Encoders should possibly validate string arguments for validity

Open janmotl opened this issue 6 years ago • 0 comments

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)

janmotl avatar Feb 26 '19 16:02 janmotl