make imputer work for factors (replace with mode)

Can you label the test cases more descriptively?