1
$\begingroup$

Confused as to when to use StringIndexer vs StringIndexer+OneHotEncoder.

The OneHotEncoder docs say

For string type input data, it is common to encode categorical features using StringIndexer first.

In what situations would I want to take the extra step of transforming StringIndex'ed output to one-hot encoded features?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.