2
$\begingroup$

The question is in reference to solution of Titanic survival predictionat kaggle . As many have did the similar kind of feature extraction,

  1. They have converted some of the numerical features (Age, Fares) to Categorical types with Nominal labels (1,2,3) using bands.

    Does it help for models to fit efficiently if we have all features in categorical values form?

  2. I have been knowing that if you have categorical values, you should convert them into numerical first, and than to DUMMY Variables. But in the solution it is not done, is dummying not needed?

$\endgroup$
2
$\begingroup$

Some libraries auto encode categorical features into numbers before running the model. Pre-processing the categorical features is done explicitly by the programmer or within framework. Can you post more details with your questions?

|improve this answer|||||
$\endgroup$
1
$\begingroup$

Categorical variables can be changed using label encoder as well as dummy variable encoding. If your categorical variable represent numbers that are significant, like ranking of students based on their grades First, Second, Third and so on. You can just change them numbers that well represents the grade such as to 1, 2, 3 and so. If they are not significant, for example if the first, second and third represent dates, they must be encoded using dummy variable. Changing to dummy variable does not require it to change it to numerical value first. You can encode it using dummy variables. I prefer to use pandas.get_dummies to get dummy variables for simplicity.

|improve this answer|||||
$\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.