0
$\begingroup$

Having a lot of categorical features and other numerics why we need to transform the categorical to binary values? Is it for using the values in mathematics functions of the algorithms?

Thanks!

$\endgroup$
0
$\begingroup$

Yes. If you need the information of your categorical variables then you need to represent them by numbers as most of machine learning algorithms are math-based.

$\endgroup$
0
$\begingroup$

You need to transfer the categorical variable to numerical to feed to the model and then comes the real question, why we convert it the way we do. We convert an n level of the categorical variable to n-1 dummy variables. There are two main reasons for it:

  1. Do avoid the collinearity into the created dummy variables

    1. To avoid the artificial ordering in directly converting the categorical levels to numeric levels
$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.