1
$\begingroup$

I'm a beginner in machine learning. I'm working on the Titanic problem on Kaggle. One of the features in this problem is the passenger class. The passenger class can be either 1st, 2nd, or 3rd class. I was thinking of using logistic regression to solve this problem, and the passenger class would be one of the features, where 1st passenger class is assigned value 1, 2nd assigned value 2, and so on.

I have few questions:

  • Is it valid to use the approach of assigning numerical values for non-numerical features, i.e. the classes?
  • If so, does it matter what value you assign to each type for a feature? That is, would it make a difference in the outcome if I assign say 3 for class 1, 1 for class 2, and 2 for class 3?

For the second question, I'm pretty sure it'd have an effect on the parameters that are learnt, but I'm wondering whether it'd have any effect on the accuracy of the hypothesis function.

$\endgroup$
0

0